commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r800643 - /commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java
Date Tue, 04 Aug 2009 00:37:10 GMT
Author: niallp
Date: Tue Aug  4 00:37:09 2009
New Revision: 800643

URL: http://svn.apache.org/viewvc?rev=800643&view=rev
Log:
BEANUTILS-336 Fix NullPointerException and only catch ClassNotFoundException rather than throwable
- thanks to Sebb

Modified:
    commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java

Modified: commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java?rev=800643&r1=800642&r2=800643&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java
(original)
+++ commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java
Tue Aug  4 00:37:09 2009
@@ -491,15 +491,16 @@
             if (classLoader != null) {
                 try {
                     return classLoader.loadClass(className);
-                } catch (Throwable t) {
+                } catch (ClassNotFoundException e) {
                     // ignore
                 }
             }
 
             // Try this class's class loader
+            classLoader = MappedPropertyDescriptor.class.getClassLoader();
             try {
                 return classLoader.loadClass(className);
-            } catch (Throwable t) {
+            } catch (ClassNotFoundException e) {
                 return null;
             }
         }



Mime
View raw message