More non-nulling.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2151 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2007-07-30 22:10:09 +00:00
parent 8ba36474c1
commit 8e9a269bc2
@@ -232,8 +232,7 @@ public class SimpleRepository extends Repository
} catch (RuntimeException rte) {
// back out our changes if something got hosed
try {
if (supportsTransactions &&
conn != null && !conn.isClosed()) {
if (supportsTransactions && conn != null && !conn.isClosed()) {
conn.rollback();
}
} catch (SQLException rbe) {
@@ -245,7 +244,7 @@ public class SimpleRepository extends Repository
} finally {
if (conn != null) {
// restore our auto-commit settings
if (oldAutoCommit != null && !conn.isClosed()) {
if (oldAutoCommit != null && conn != null && !conn.isClosed()) {
try {
conn.setAutoCommit(oldAutoCommit);
} catch (SQLException sace) {