From 509314b10a9c2df682d7741532f0b039d7d11e05 Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Sat, 5 Feb 2011 00:39:01 +0000 Subject: [PATCH] CSPACE-2497: Corrected order of JDBC close() statements in finally() block in AddIndices. --- .../collectionspace/services/common/init/AddIndices.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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()); } -- 2.47.3