cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r903767 - in /cxf/branches/2.2.x-fixes: ./ common/common/src/main/java/org/apache/cxf/jaxb/JAXBUtils.java
Date Wed, 27 Jan 2010 17:58:03 GMT
Author: dkulp
Date: Wed Jan 27 17:58:02 2010
New Revision: 903767

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

........
  r903760 | dkulp | 2010-01-27 12:50:33 -0500 (Wed, 27 Jan 2010) | 2 lines
  
  [CXF-2635] JAXB can use non-public default constructors.  Check for
  that.
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/jaxb/JAXBUtils.java

Propchange: cxf/branches/2.2.x-fixes/
            ('svn:mergeinfo' removed)

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

Modified: cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/jaxb/JAXBUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/jaxb/JAXBUtils.java?rev=903767&r1=903766&r2=903767&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/jaxb/JAXBUtils.java
(original)
+++ cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/jaxb/JAXBUtils.java
Wed Jan 27 17:58:02 2010
@@ -26,6 +26,7 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 import java.lang.reflect.Type;
@@ -493,11 +494,17 @@
             if (cls.getName().equals("javax.xml.ws.wsaddressing.W3CEndpointReference")) {
                 return cls;
             }
+            Constructor cons = null;
             try {
-                if (cls.getConstructor(new Class[0]) == null) {
-                    cls = null;
-                }
+                cons = cls.getDeclaredConstructor(new Class[0]);
             } catch (NoSuchMethodException ex) {
+                try {
+                    cons = cls.getConstructor(new Class[0]);
+                } catch (NoSuchMethodException ex2) {
+                    cons = null;
+                }
+            }
+            if (cons == null) {
                 cls = null;
             }
         }



Mime
View raw message