Author: sebb
Date: Thu Sep 22 11:01:49 2011
New Revision: 1174053
URL: http://svn.apache.org/viewvc?rev=1174053&view=rev
Log:
DBUTILS-80 DbUtils.loadDriver catches Throwable
Modified:
commons/proper/dbutils/trunk/src/changes/changes.xml
commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/DbUtils.java
Modified: commons/proper/dbutils/trunk/src/changes/changes.xml
URL:
http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/changes/changes.xml?rev=1174053&r1=1174052&r2=1174053&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/changes/changes.xml (original)
+++ commons/proper/dbutils/trunk/src/changes/changes.xml Thu Sep 22 11:01:49
2011
@@ -39,6 +39,9 @@ The <action> type attribute can be add,u
</properties>
<body>
<release version="1.4" date="2011-09-??" description="Bugfixes and
addition of asynchronous QueryLoader">
+ <action type="fix" issue="DBUTILS-80">
+ DbUtils.loadDriver catches Throwable
+ </action>
<action type="fix" issue="DBUTILS-65">
Duplicate code introduced during Java 1.5 branch merge
</action>
Modified:
commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/DbUtils.java
URL:
http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/DbUtils.java?rev=1174053&r1=1174052&r2=1174053&view=diff
==============================================================================
---
commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/DbUtils.java
(original)
+++
commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/DbUtils.java
Thu Sep 22 11:01:49 2011
@@ -180,18 +180,13 @@ public final class DbUtils {
Class.forName(driverClassName).newInstance();
return true;
- } catch (ClassNotFoundException e) {
- return false;
-
} catch (IllegalAccessException e) {
// Constructor is private, OK for DriverManager contract
return true;
- } catch (InstantiationException e) {
+ } catch (Exception e) {
return false;
- } catch (Throwable e) {
- return false;
}
}