| 1 |
|
package com.atlassian.core.db; |
| 2 |
|
|
| 3 |
|
import java.sql.Connection; |
| 4 |
|
import java.sql.ResultSet; |
| 5 |
|
import java.sql.SQLException; |
| 6 |
|
import java.sql.Statement; |
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
|
|
|
| 0% |
Uncovered Elements: 18 (18) |
Complexity: 10 |
Complexity Density: 1.11 |
|
| 11 |
|
public class JDBCUtils |
| 12 |
|
{ |
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 3 |
Complexity Density: 1 |
|
| 13 |
0
|
public static void close(Statement stmt)... |
| 14 |
|
{ |
| 15 |
0
|
if (stmt != null) |
| 16 |
|
{ |
| 17 |
0
|
try |
| 18 |
|
{ |
| 19 |
0
|
stmt.close(); |
| 20 |
|
} |
| 21 |
|
catch (SQLException e) |
| 22 |
|
{ |
| 23 |
|
|
| 24 |
|
} |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 3 |
Complexity Density: 1 |
|
| 28 |
0
|
public static void close(ResultSet rs)... |
| 29 |
|
{ |
| 30 |
0
|
if (rs != null) |
| 31 |
|
{ |
| 32 |
0
|
try |
| 33 |
|
{ |
| 34 |
0
|
rs.close(); |
| 35 |
|
} |
| 36 |
|
catch (SQLException e) |
| 37 |
|
{ |
| 38 |
|
|
| 39 |
|
} |
| 40 |
|
} |
| 41 |
|
} |
| 42 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 4 |
Complexity Density: 1.33 |
|
| 43 |
0
|
public static void close(Connection conn)... |
| 44 |
|
{ |
| 45 |
0
|
try |
| 46 |
|
{ |
| 47 |
0
|
if (conn != null && !conn.isClosed()) |
| 48 |
|
{ |
| 49 |
0
|
conn.close(); |
| 50 |
|
} |
| 51 |
|
} |
| 52 |
|
catch (SQLException e) |
| 53 |
|
{ |
| 54 |
|
|
| 55 |
|
} |
| 56 |
|
} |
| 57 |
|
} |