Polishing

This commit is contained in:
Yanming Zhou
2024-05-08 22:54:14 +08:00
committed by Juergen Hoeller
parent 7b16988ec9
commit 8137cc9566

View File

@@ -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 {
// 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);