Skip to content

Commit

Permalink
FBTestBase changes required for JDBC-183 test
Browse files Browse the repository at this point in the history
  • Loading branch information
mrotteveel committed Sep 2, 2011
1 parent ad93381 commit 2e357c6
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/test/org/firebirdsql/common/FBTestBase.java
Expand Up @@ -243,4 +243,36 @@ protected void tearDown() throws Exception {
gdsTypeToUrlPrefixMap.put(GDSType.getType("NIO"),
"jdbc:firebirdsql:nio:");
}

/**
* Helper method to quietly close statements.
*
* @param stmt Statement object
*/
protected void closeQuietly(Statement stmt) {
if (stmt == null) {
return;
}
try {
stmt.close();
} catch (SQLException ex) {
//ignore
}
}

/**
* Helper method to quietly close connections.
*
* @param stmt Statement object
*/
protected void closeQuietly(Connection con) {
if (con == null) {
return;
}
try {
con.close();
} catch (SQLException ex) {
//ignore
}
}
}

0 comments on commit 2e357c6

Please sign in to comment.