We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd5b815 commit 2996647Copy full SHA for 2996647
src/main/java/ru/mystamps/web/dao/impl/JdbcUtils.java
@@ -26,12 +26,13 @@ private JdbcUtils() {
26
}
27
28
// @see http://stackoverflow.com/q/2920364/checking-for-a-null-int-value-from-a-java-resultset
29
+ @SuppressWarnings("PMD.PrematureDeclaration")
30
public static Integer getInteger(ResultSet resultSet, String fieldName) throws SQLException {
31
+ int value = resultSet.getInt(fieldName);
32
if (resultSet.wasNull()) {
33
return null;
34
35
- int value = resultSet.getInt(fieldName);
36
return Integer.valueOf(value);
37
38
0 commit comments