1
2
3
4
5
6
7
8
9
10
11 package ch.qos.logback.core.db;
12
13 import java.sql.Connection;
14 import java.sql.SQLException;
15 import java.sql.Statement;
16
17
18
19
20
21 public class DBHelper {
22
23 static public void closeConnection(Connection connection) {
24 if (connection != null) {
25 try {
26 connection.close();
27 } catch (SQLException sqle) {
28
29
30 }
31 }
32 }
33
34 public static void closeStatement(Statement statement) {
35 if (statement != null) {
36 try {
37 statement.close();
38 } catch (SQLException sqle) {
39 }
40 }
41 }
42 }