camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1428463 - /camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePackageScanClassResolver.java
Date Thu, 03 Jan 2013 16:43:27 GMT
Author: davsclaus
Date: Thu Jan  3 16:43:27 2013
New Revision: 1428463

URL: http://svn.apache.org/viewvc?rev=1428463&view=rev
Log:
Fixed potential NPE from user forum

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePackageScanClassResolver.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePackageScanClassResolver.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePackageScanClassResolver.java?rev=1428463&r1=1428462&r2=1428463&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePackageScanClassResolver.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePackageScanClassResolver.java
Thu Jan  3 16:43:27 2013
@@ -43,7 +43,7 @@ public class WebSpherePackageScanClassRe
      * @return  <tt>true</tt> if IBM classloader, <tt>false</tt>
otherwise.
      */
     public static boolean isWebSphereClassLoader(ClassLoader loader) {
-        return loader.getClass().getName().startsWith("com.ibm");
+        return loader != null ? loader.getClass().getName().startsWith("com.ibm") : false;
     }
 
     /**



Mime
View raw message