Skip to content

Commit 799658e

Browse files
committed
Added null-check in release
1 parent f6b3a77 commit 799658e

File tree

1 file changed

+3
-0
lines changed
  • src/main/java/org/javawebstack/orm/connection/pool

1 file changed

+3
-0
lines changed

src/main/java/org/javawebstack/orm/connection/pool/SQLPool.java

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ public PooledSQL get() {
4242
}
4343

4444
public void release(SQL sql) {
45+
if(sql == null) {
46+
throw new IllegalArgumentException("sql must not be null");
47+
}
4548
if(!closing) {
4649
if(sql instanceof PooledSQL) {
4750
sql.close();

0 commit comments

Comments
 (0)