Skip to content

Commit 2996647

Browse files
committed
Revert "JdbcUtils: fix (instead of ignoring) PMD warning about premature variable declaration."
This reverts commit 33e9e14. Fix #419
1 parent dd5b815 commit 2996647

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ 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")
2930
public static Integer getInteger(ResultSet resultSet, String fieldName) throws SQLException {
31+
int value = resultSet.getInt(fieldName);
3032
if (resultSet.wasNull()) {
3133
return null;
3234
}
3335

34-
int value = resultSet.getInt(fieldName);
3536
return Integer.valueOf(value);
3637
}
3738

0 commit comments

Comments
 (0)