Browse Source

Polished the support for looking up column values by column label (SPR-7506)

pull/1234/head
Thomas Risberg 15 years ago
parent
commit
1247d2085b
  1. 10
      org.springframework.jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java

10
org.springframework.jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java

@ -131,13 +131,13 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { @@ -131,13 +131,13 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet {
*/
public int findColumn(String columnLabel) throws InvalidResultSetAccessException {
Integer columnIndex = columnLabelMap.get(columnLabel);
try {
if (columnIndex == null) {
if (columnIndex == null) {
try {
columnIndex = this.resultSet.findColumn(columnLabel);
}
}
catch (SQLException se) {
throw new InvalidResultSetAccessException(se);
catch (SQLException se) {
throw new InvalidResultSetAccessException(se);
}
}
return columnIndex.intValue();
}

Loading…
Cancel
Save