Check null before close connection

4.x.x
manoj 10 years ago
parent 3dcb42ee64
commit f68c7133cf

@ -94,6 +94,7 @@ public class OperationManagementDAOFactory {
public static void closeConnection() throws OperationManagementDAOException { public static void closeConnection() throws OperationManagementDAOException {
Connection con = currentConnection.get(); Connection con = currentConnection.get();
if (con != null) {
try { try {
con.close(); con.close();
} catch (SQLException e) { } catch (SQLException e) {
@ -101,6 +102,7 @@ public class OperationManagementDAOFactory {
} }
currentConnection.remove(); currentConnection.remove();
} }
}
public static void commitTransaction() throws OperationManagementDAOException { public static void commitTransaction() throws OperationManagementDAOException {
try { try {

Loading…
Cancel
Save