Polishing
This commit is contained in:
@@ -37,6 +37,7 @@ import org.springframework.jdbc.CannotGetJdbcConnectionException;
|
||||
import org.springframework.jdbc.datasource.DataSourceUtils;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.NumberUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Generic utility methods for working with JDBC. Mainly for internal use
|
||||
@@ -452,7 +453,7 @@ public abstract class JdbcUtils {
|
||||
*/
|
||||
public static String lookupColumnName(ResultSetMetaData resultSetMetaData, int columnIndex) throws SQLException {
|
||||
String name = resultSetMetaData.getColumnLabel(columnIndex);
|
||||
if (name == null || name.length() < 1) {
|
||||
if (!StringUtils.hasLength(name)) {
|
||||
name = resultSetMetaData.getColumnName(columnIndex);
|
||||
}
|
||||
return name;
|
||||
|
||||
Reference in New Issue
Block a user