Skip to content

Commit

Permalink
Merge pull request #25 from ake2l/development
Browse files Browse the repository at this point in the history
if Resultsetcount negative return 0
  • Loading branch information
ake2l authored Aug 28, 2023
2 parents a2e87c9 + 01c1ed1 commit ce1bfee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/rapiddweller/jdbacl/DBUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,9 @@ public static void closeResultSetAndStatement(ResultSet resultSet, Statement sta
}

public static int getOpenResultSetCount() {
return LoggingResultSetHandler.getOpenResultSetCount();
// if -1 return 0
int openResultSetCount = LoggingResultSetHandler.getOpenResultSetCount();
return Math.max(openResultSetCount, 0);
}

public static Object parseAndSimplifyResultSet(ResultSet resultSet) throws SQLException {
Expand Down

0 comments on commit ce1bfee

Please sign in to comment.