Skip to content

Commit 9b0412f

Browse files
committed
fixed NamedParameterJdbcTemplate to use correct maximum type for queryForInt/Long (SPR-8652)
1 parent 7eee3b9 commit 9b0412f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

org.springframework.jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterQueryTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ public void testQueryForIntWithParamMap() throws Exception {
518518
ctrlResultSet.setReturnValue(mockResultSetMetaData);
519519
mockResultSet.next();
520520
ctrlResultSet.setReturnValue(true);
521-
mockResultSet.getDouble(1);
521+
mockResultSet.getInt(1);
522522
ctrlResultSet.setReturnValue(22.0d);
523523
mockResultSet.wasNull();
524524
ctrlResultSet.setReturnValue(false);
@@ -561,7 +561,7 @@ public void testQueryForLongWithParamBean() throws Exception {
561561
ctrlResultSet.setReturnValue(mockResultSetMetaData);
562562
mockResultSet.next();
563563
ctrlResultSet.setReturnValue(true);
564-
mockResultSet.getDouble(1);
564+
mockResultSet.getLong(1);
565565
ctrlResultSet.setReturnValue(87.0d);
566566
mockResultSet.wasNull();
567567
ctrlResultSet.setReturnValue(false);

0 commit comments

Comments
 (0)