ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1718463 - /webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/locator/DefaultOMMetaFactoryLocator.java
Date Mon, 07 Dec 2015 21:06:53 GMT
Author: veithen
Date: Mon Dec  7 21:06:52 2015
New Revision: 1718463

URL: http://svn.apache.org/viewvc?rev=1718463&view=rev
Log:
Avoid NullPointerException in DefaultOMMetaFactoryLocator in weird deployment scenarios.

Modified:
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/locator/DefaultOMMetaFactoryLocator.java

Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/locator/DefaultOMMetaFactoryLocator.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/locator/DefaultOMMetaFactoryLocator.java?rev=1718463&r1=1718462&r2=1718463&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/locator/DefaultOMMetaFactoryLocator.java
(original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/locator/DefaultOMMetaFactoryLocator.java
Mon Dec  7 21:06:52 2015
@@ -38,6 +38,13 @@ public final class DefaultOMMetaFactoryL
     public DefaultOMMetaFactoryLocator() {
         ClassLoader classLoader = DefaultOMMetaFactoryLocator.class.getClassLoader();
         
+        // Fall back to the system class loader if Axiom is loaded form the bootstrap
+        // class loader (There is no good reason to do that, but we don't want people to
+        // blame Axiom if things break).
+        if (classLoader == null) {
+            classLoader = ClassLoader.getSystemClassLoader();
+        }
+        
         Loader loader = new DefaultLoader(classLoader);
         
         List<Implementation> implementations = new ArrayList<Implementation>();



Mime
View raw message