commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject cvs commit: jakarta-commons/dbcp/src/java/org/apache/commons/dbcp BasicDataSource.java
Date Mon, 11 Aug 2003 16:11:34 GMT
dirkv       2003/08/11 09:11:34

  Modified:    dbcp/src/java/org/apache/commons/dbcp BasicDataSource.java
  Log:
  fix 2 "variable not used" warnings
  
  Revision  Changes    Path
  1.17      +8 -6      jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java
  
  Index: BasicDataSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- BasicDataSource.java	11 Aug 2003 16:01:25 -0000	1.16
  +++ BasicDataSource.java	11 Aug 2003 16:11:34 -0000	1.17
  @@ -626,9 +626,8 @@
           }
   
           // Load the JDBC driver class
  -        Class driverClass = null;
           try {
  -            driverClass = Class.forName(driverClassName);
  +            Class.forName(driverClassName);
           } catch (Throwable t) {
               String message = "Cannot load JDBC driver class '" +
                   driverClassName + "'";
  @@ -692,6 +691,9 @@
                                                 defaultReadOnly,
                                                 defaultAutoCommit,
                                                 abandonedConfig);
  +            if (connectionFactory == null) {
  +                throw new SQLException("Cannot create PoolableConnectionFactory");
  +            }
           } catch(RuntimeException e) {
               throw e;
           } catch(Exception e) {
  
  
  

Mime
View raw message