[jOOQ/jOOQ#11105] NullPointerException when GenerationTool is not properly initialised
This commit is contained in:
parent
5c41eea8e3
commit
ddae3adfca
@ -903,7 +903,9 @@ public class GenerationTool {
|
||||
// Close connection only if it was created by the GenerationTool
|
||||
if (connection != null) {
|
||||
if (close) {
|
||||
if (ctx.family() == HSQLDB && dataSource == null)
|
||||
|
||||
// [#11105] In case of misconfiguration, the ctx reference could be null as a side effect
|
||||
if (ctx != null && ctx.family() == HSQLDB && dataSource == null)
|
||||
ctx.execute("shutdown");
|
||||
|
||||
connection.close();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user