Author: dkulp
Date: Fri Jun 7 15:02:02 2013
New Revision: 1490672
URL: http://svn.apache.org/r1490672
Log:
[CXF-5059] The bus is garanteed to be null during registerInitialXmlExtensions
so pass the bus into it.
Modified:
cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
Modified:
cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java?rev=1490672&r1=1490671&r2=1490672&view=diff
==============================================================================
--- cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
(original)
+++ cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
Fri Jun 7 15:02:02 2013
@@ -89,6 +89,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();
@@ -116,10 +119,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);
}
@@ -265,16 +265,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);