cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r691727 - in /cxf/branches/2.0.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:45:47 GMT
Author: dkulp
Date: Wed Sep  3 11:45:47 2008
New Revision: 691727

URL: http://svn.apache.org/viewvc?rev=691727&view=rev
Log:
Merged revisions 691711 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.1.x-fixes

................
  r691711 | dkulp | 2008-09-03 14:20:07 -0400 (Wed, 03 Sep 2008) | 9 lines
  
  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.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
    cxf/branches/2.0.x-fixes/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
    cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep  3 11:45:47 2008
@@ -1,3 +1,3 @@
-/cxf/branches/2.1.x-fixes:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048,677385,678004,678009,678559,678629,678808,678852,678891,678893,679248,679597,680435,681060,681165,681813,681816,682902,682951,683089,683290,683318,684099,684790-684793,684842,684862,684895-684918,685205,685253,686237,686283,686299,686333-686364,686765,686827,687097,687464-687465,689109,689112,689122,691316,691357,691491
-/cxf/trunk:651669-686342,686344-686363,686764,686820,687096,687387,687463,688086,688102,688735,691271,691355,691488
+/cxf/branches/2.1.x-fixes:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048,677385,678004,678009,678559,678629,678808,678852,678891,678893,679248,679597,680435,681060,681165,681813,681816,682902,682951,683089,683290,683318,684099,684790-684793,684842,684862,684895-684918,685205,685253,686237,686283,686299,686333-686364,686765,686827,687097,687464-687465,689109,689112,689122,691316,691357,691491,691711
+/cxf/trunk:651669-686342,686344-686363,686764,686820,687096,687387,687463,688086,688102,688735,691271,691355,691488,691602
 /incubator/cxf/trunk:434594-651668

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Sep  3 11:45:47 2008
@@ -1 +1 @@
-/cxf/branches/2.1.x-fixes:1-686313,686315-686332,686334-686346,686348-686828,687097,687464-687465,689109,689112,689122,691316,691357,691491
+/cxf/branches/2.1.x-fixes:1-686313,686315-686332,686334-686346,686348-686828,687097,687464-687465,689109,689112,689122,691316,691357,691491,691711

Modified: cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java?rev=691727&r1=691726&r2=691727&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
(original)
+++ cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
Wed Sep  3 11:45:47 2008
@@ -45,6 +45,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;
@@ -65,12 +66,13 @@
         typeClass = cls;
     }
     
-    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);
     }
     

Modified: cxf/branches/2.0.x-fixes/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java?rev=691727&r1=691726&r2=691727&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
(original)
+++ cxf/branches/2.0.x-fixes/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
Wed Sep  3 11:45:47 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.0.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java?rev=691727&r1=691726&r2=691727&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
Wed Sep  3 11:45:47 2008
@@ -237,9 +237,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