HHH-8698 ColumnNameCache wraps and unwraps int to Integer multiple times

This commit is contained in:
Steve Ebersole 2013-11-16 13:49:29 -06:00
parent 71d5a746e3
commit 47114c35b2
1 changed files with 3 additions and 2 deletions

View File

@ -49,12 +49,13 @@ public final class ColumnNameCache {
*
* @return The index
*
* @throws SQLException INdicates a problems accessing the underlying JDBC ResultSet
* @throws SQLException Indicates a problems accessing the underlying JDBC ResultSet
*/
@SuppressWarnings("UnnecessaryBoxing")
public Integer getIndexForColumnName(String columnName, ResultSet rs) throws SQLException {
final Integer cached = columnNameToIndexCache.get( columnName );
if ( cached != null ) {
return cached.intValue();
return cached;
}
else {
final Integer index = Integer.valueOf( rs.findColumn( columnName ) );