Skip to content

Commit

Permalink
Merge 8bf6605 into 02c347a
Browse files Browse the repository at this point in the history
  • Loading branch information
zepernick committed Feb 22, 2018
2 parents 02c347a + 8bf6605 commit ef1cec6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,10 @@ protected void doExecute(String finalLocation, ActionInvocation invocation) thro
throw new ServletException(e.getMessage(), e);
} finally {
try {
conn.close();
if(conn != null) {
// avoid NPE if connection was not used for the report
conn.close();
}
} catch (Exception e) {
LOG.warn("Could not close db connection properly", e);
}
Expand Down

0 comments on commit ef1cec6

Please sign in to comment.