Browse Source

Polishing

pull/32784/head
Yanming Zhou 2 years ago committed by Juergen Hoeller
parent
commit
8137cc9566
  1. 3
      spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java

3
spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java

@ -30,6 +30,7 @@ import java.util.Map; @@ -30,6 +30,7 @@ import java.util.Map;
import org.springframework.jdbc.InvalidResultSetAccessException;
import org.springframework.lang.Nullable;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
/**
* The default implementation of Spring's {@link SqlRowSet} interface, wrapping a
@ -110,7 +111,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { @@ -110,7 +111,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet {
// Also support column names prefixed with table name
// as in {table_name}.{column.name}.
String table = rsmd.getTableName(i);
if (table != null && !table.isEmpty()) {
if (StringUtils.hasLength(table)) {
key = table + "." + rsmd.getColumnName(i);
if (!this.columnLabelMap.containsKey(key)) {
this.columnLabelMap.put(key, i);

Loading…
Cancel
Save