Skip to content

Commit 33e9e14

Browse files
committed
JdbcUtils: fix (instead of ignoring) PMD warning about premature variable declaration.
Should be in 5caa57c commit. No functional changes.
1 parent c682ac4 commit 33e9e14

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/ru/mystamps/web/dao/impl/JdbcUtils.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@ private JdbcUtils() {
2626
}
2727

2828
// @see http://stackoverflow.com/q/2920364/checking-for-a-null-int-value-from-a-java-resultset
29-
@SuppressWarnings("PMD.PrematureDeclaration")
3029
public static Integer getInteger(ResultSet resultSet, String fieldName) throws SQLException {
31-
int value = resultSet.getInt(fieldName);
3230
if (resultSet.wasNull()) {
3331
return null;
3432
}
3533

34+
int value = resultSet.getInt(fieldName);
3635
return Integer.valueOf(value);
3736
}
3837

0 commit comments

Comments
 (0)