You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2013/06/07 22:57:32 UTC

svn commit: r1490823 - /cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java

Author: dkulp
Date: Fri Jun  7 20:57:31 2013
New Revision: 1490823

URL: http://svn.apache.org/r1490823
Log:
Merged revisions 1490818 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

........
  r1490818 | dkulp | 2013-06-07 16:52:35 -0400 (Fri, 07 Jun 2013) | 10 lines

  Merged revisions 1490672 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk

  ........
    r1490672 | dkulp | 2013-06-07 11:02:02 -0400 (Fri, 07 Jun 2013) | 2 lines

    [CXF-5059] The bus is garanteed to be null during registerInitialXmlExtensions so pass the bus into it.

  ........

........

Modified:
    cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java

Modified: cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java?rev=1490823&r1=1490822&r2=1490823&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java (original)
+++ cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java Fri Jun  7 20:57:31 2013
@@ -90,6 +90,9 @@ public class WSDLManagerImpl implements 
     private Bus bus;
 
     public WSDLManagerImpl() throws BusException {
+        this(null);
+    }
+    private WSDLManagerImpl(Bus b) throws BusException {
         try {
             factory = WSDLFactory.newInstance();
             registry = factory.newPopulatedExtensionRegistry();
@@ -117,10 +120,7 @@ public class WSDLManagerImpl implements 
         definitionsMap = new CacheMap<Object, Definition>();
         schemaCacheMap = new CacheMap<Object, ServiceSchemaInfo>();
 
-        registerInitialExtensions();
-    }
-    public WSDLManagerImpl(Bus b) throws BusException {
-        this();
+        registerInitialExtensions(b);
         setBus(b);
     }
     
@@ -253,16 +253,16 @@ public class WSDLManagerImpl implements 
         return def;
     }
 
-    private void registerInitialExtensions() throws BusException {
-        registerInitialXmlExtensions(EXTENSIONS_RESOURCE_COMPAT);
-        registerInitialXmlExtensions(EXTENSIONS_RESOURCE);
+    private void registerInitialExtensions(Bus b) throws BusException {
+        registerInitialXmlExtensions(EXTENSIONS_RESOURCE_COMPAT, b);
+        registerInitialXmlExtensions(EXTENSIONS_RESOURCE, b);
     }
-    private void registerInitialXmlExtensions(String resource) throws BusException {
+    private void registerInitialXmlExtensions(String resource, Bus b) throws BusException {
         Properties initialExtensions = null;
         try {
             ClassLoader cl = null;
-            if (bus != null) {
-                cl = bus.getExtension(ClassLoader.class);
+            if (b != null) {
+                cl = b.getExtension(ClassLoader.class);
             }
             if (cl != null) {
                 initialExtensions = PropertiesLoaderUtils.loadAllProperties(resource, cl);