cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r691711 - in /cxf/branches/2.1.x-fixes: ./ api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
Date Wed, 03 Sep 2008 18:20:07 GMT
Author: dkulp
Date: Wed Sep  3 11:20:07 2008
New Revision: 691711

URL: http://svn.apache.org/viewvc?rev=691711&view=rev
Log:
Merged revisions 691602 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r691602 | sergeyb | 2008-09-03 09:07:27 -0400 (Wed, 03 Sep 2008) | 1 line
  
  Updating JaxbExtensionHelper to use ClassLoaderUtils instead of Class.forName
........

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
    cxf/branches/2.1.x-fixes/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
    cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep  3 11:20:07 2008
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691355,691488
+/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691355,691488,691602

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java?rev=691711&r1=691710&r2=691711&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
(original)
+++ cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
Wed Sep  3 11:20:07 2008
@@ -48,6 +48,7 @@
 
 import org.w3c.dom.Element;
 
+import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.common.util.StringUtils;
@@ -77,12 +78,13 @@
         jaxbNamespace = ns;
     }
     
-    public static void addExtensions(ExtensionRegistry registry, String parentType, String
elementType,
-                                     ClassLoader cl) throws JAXBException, ClassNotFoundException
{
-        Class<?> parentTypeClass = Class.forName(parentType, true, cl);
-
-        Class<? extends TExtensibilityElementImpl> elementTypeClass = Class.forName(elementType,
true, cl)
-            .asSubclass(TExtensibilityElementImpl.class);
+    public static void addExtensions(ExtensionRegistry registry, String parentType, String
elementType)
+        throws JAXBException, ClassNotFoundException {
+        Class<?> parentTypeClass = ClassLoaderUtils.loadClass(parentType, JAXBExtensionHelper.class);
+
+        Class<? extends TExtensibilityElementImpl> elementTypeClass = 
+            ClassLoaderUtils.loadClass(elementType, JAXBExtensionHelper.class)
+                .asSubclass(TExtensibilityElementImpl.class);
         addExtensions(registry, parentTypeClass, elementTypeClass, null);
     }
     

Modified: cxf/branches/2.1.x-fixes/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java?rev=691711&r1=691710&r2=691711&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
(original)
+++ cxf/branches/2.1.x-fixes/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
Wed Sep  3 11:20:07 2008
@@ -66,16 +66,13 @@
     public void testAddTestExtension() throws Exception {
 
         JAXBExtensionHelper.addExtensions(registry, "javax.wsdl.Port",
-                        "org.apache.cxf.abc.test.TestPolicyType", Thread.currentThread()
-                                        .getContextClassLoader());
+                        "org.apache.cxf.abc.test.TestPolicyType");
 
         JAXBExtensionHelper.addExtensions(registry, "javax.wsdl.Port",
-                        "org.apache.cxf.abc.test.AnotherPolicyType", Thread.currentThread()
-                                        .getContextClassLoader());
+                        "org.apache.cxf.abc.test.AnotherPolicyType");
 
         JAXBExtensionHelper.addExtensions(registry, "javax.wsdl.Definition",
-                        "org.apache.cxf.abc.test.NewServiceType", Thread.currentThread()
-                                        .getContextClassLoader());
+                        "org.apache.cxf.abc.test.NewServiceType");
 
         String file = this.getClass().getResource("/wsdl/test_ext.wsdl").toURI().toString();
 
@@ -109,8 +106,7 @@
     @Test
     public void testPrettyPrintXMLStreamWriter() throws Exception {
         JAXBExtensionHelper.addExtensions(registry, "javax.wsdl.Definition",
-                        "org.apache.cxf.abc.test.NewServiceType", Thread.currentThread()
-                                        .getContextClassLoader());
+                        "org.apache.cxf.abc.test.NewServiceType");
 
         String file = this.getClass().getResource("/wsdl/test_ext.wsdl").toURI().toString();
 

Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java?rev=691711&r1=691710&r2=691711&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
Wed Sep  3 11:20:07 2008
@@ -238,9 +238,7 @@
                 if (LOG.isLoggable(Level.FINE)) {
                     LOG.fine("Registering extension: " + elementType + " for parent: " +
parentType);
                 }
-                JAXBExtensionHelper.addExtensions(registry, parentType, elementType, 
-                                                  Thread.currentThread()
-                                                      .getContextClassLoader());
+                JAXBExtensionHelper.addExtensions(registry, parentType, elementType);
             } catch (ClassNotFoundException ex) {
                 LOG.log(Level.WARNING, "EXTENSION_ADD_FAILED_MSG", ex);
             } catch (JAXBException ex) {



Mime
View raw message