Browse Source

Update spring-test re: deprecated queryForInt()

Now invoking JdbcTemplate's queryForObject() method instead
of the deprecated queryForInt() method within the test suite.

Issue: SPR-10257
pull/243/head
Sam Brannen 12 years ago
parent
commit
4bdf382714
  1. 2
      spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AbstractTransactionalAnnotatedConfigClassTests.java

2
spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AbstractTransactionalAnnotatedConfigClassTests.java

@ -76,7 +76,7 @@ public abstract class AbstractTransactionalAnnotatedConfigClassTests { @@ -76,7 +76,7 @@ public abstract class AbstractTransactionalAnnotatedConfigClassTests {
}
private int countRowsInTable(String tableName) {
return jdbcTemplate.queryForInt("SELECT COUNT(0) FROM " + tableName);
return jdbcTemplate.queryForObject("SELECT COUNT(0) FROM " + tableName, Integer.class);
}
private int createPerson(String name) {

Loading…
Cancel
Save