From: Aron Roberts Date: Sat, 5 Feb 2011 00:39:01 +0000 (+0000) Subject: CSPACE-2497: Corrected order of JDBC close() statements in finally() block in AddIndices. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=509314b10a9c2df682d7741532f0b039d7d11e05;p=tmp%2Fjakarta-migration.git CSPACE-2497: Corrected order of JDBC close() statements in finally() block in AddIndices. --- diff --git a/services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java b/services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java index 512e5d762..5295d666e 100755 --- a/services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java +++ b/services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java @@ -177,14 +177,14 @@ public class AddIndices extends InitHandler implements IInitHandler { } finally { try { if (rs != null) { - conn.close(); - } - if (conn != null) { - conn.close(); + rs.close(); } if (stmt != null) { stmt.close(); } + if (conn != null) { + conn.close(); + } } catch (SQLException sqle) { logger.debug("SQL Exception closing statement/connection in AddIndices: " + sqle.getLocalizedMessage()); }