Author: shawkins
Date: 2010-07-15 13:38:22 -0400 (Thu, 15 Jul 2010)
New Revision: 2351
Modified:
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java
Log:
preventing npe when the connection cannot be obtained
Modified:
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java
===================================================================
---
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java 2010-07-15
16:22:12 UTC (rev 2350)
+++
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java 2010-07-15
17:38:22 UTC (rev 2351)
@@ -249,6 +249,9 @@
@Override
public void closeConnection(Connection connection, DataSource factory) {
+ if (connection == null) {
+ return;
+ }
try {
connection.close();
} catch (SQLException e) {
Show replies by date