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; } }