commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r832634 - /commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingDriver.java
Date Wed, 04 Nov 2009 00:31:50 GMT
Author: psteitz
Date: Wed Nov  4 00:31:50 2009
New Revision: 832634

URL: http://svn.apache.org/viewvc?rev=832634&view=rev
Log:
Made PoolGuardConnectionWrapper static, eliminated possible NPE in toString.

Modified:
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingDriver.java

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingDriver.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingDriver.java?rev=832634&r1=832633&r2=832634&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingDriver.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingDriver.java Wed Nov
 4 00:31:50 2009
@@ -251,7 +251,7 @@
      * PoolGuardConnectionWrapper is a Connection wrapper that makes sure a 
      * closed connection cannot be used anymore.
      */
-    private class PoolGuardConnectionWrapper extends DelegatingConnection {
+    static private class PoolGuardConnectionWrapper extends DelegatingConnection {
 
         private ObjectPool pool;
         private Connection delegate;
@@ -409,7 +409,7 @@
 
         public String toString() {
             if (delegate == null){
-                return null;
+                return "NULL";
             }
             return delegate.toString();
         }



Mime
View raw message