]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-2497: Corrected order of JDBC close() statements in finally() block in AddIndices.
authorAron Roberts <aron@socrates.berkeley.edu>
Sat, 5 Feb 2011 00:39:01 +0000 (00:39 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Sat, 5 Feb 2011 00:39:01 +0000 (00:39 +0000)
services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java

index 512e5d762cbf28c66186d0bd97f945d6466a3fcd..5295d666e434ecad3b8b97d9ed194ba9d3f9fa20 100755 (executable)
@@ -177,14 +177,14 @@ public class AddIndices extends InitHandler implements IInitHandler {
         } finally {\r
             try {\r
                 if (rs != null) {\r
-                    conn.close();\r
-                }\r
-                if (conn != null) {\r
-                    conn.close();\r
+                    rs.close();\r
                 }\r
                 if (stmt != null) {\r
                     stmt.close();\r
                 }\r
+                if (conn != null) {\r
+                    conn.close();\r
+                }\r
             } catch (SQLException sqle) {\r
                 logger.debug("SQL Exception closing statement/connection in AddIndices: " + sqle.getLocalizedMessage());\r
             }\r