Skip to content

Commit

Permalink
SimpleDerbyTest: Avoid confusing cleanup NPE when DB start failed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ecki committed Sep 15, 2022
1 parent aff9942 commit 0ddd370
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ public static void destroyDatabase()
{
System.out.println("Tearing down database");
EmbeddedDataSource ds = (EmbeddedDataSource)dataSource; dataSource = null;
ds.setShutdownDatabase("true");
if (ds != null) // avoid exception during init errors
{
ds.setShutdownDatabase("true");
}
}

@Override
Expand Down

0 comments on commit 0ddd370

Please sign in to comment.