SEC-3029: Fix Compatibility with Spring 4.2.x

This commit is contained in:
Rob Winch
2015-07-07 22:46:31 -05:00
parent 848523e47a
commit 197ddb3cd1
9 changed files with 51 additions and 30 deletions

View File

@@ -375,7 +375,7 @@ public class JdbcUserDetailsManager extends JdbcDaoImpl implements UserDetailsMa
}
private int findGroupId(String group) {
return getJdbcTemplate().queryForInt(findGroupIdSql, group);
return getJdbcTemplate().queryForObject(findGroupIdSql, Integer.class, group);
}
public void setAuthenticationManager(AuthenticationManager authenticationManager) {

View File

@@ -250,7 +250,8 @@ public class JdbcUserDetailsManagerTests {
assertEquals(
0,
template.queryForInt("select id from groups where group_name = 'GROUP_X'"));
(int) template.queryForObject("select id from groups where group_name = 'GROUP_X'",
Integer.class));
}
@Test