cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r984964 - /cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
Date Thu, 12 Aug 2010 20:51:48 GMT
Author: dkulp
Date: Thu Aug 12 20:51:47 2010
New Revision: 984964

URL: http://svn.apache.org/viewvc?rev=984964&view=rev
Log:
The 2.2 jax-ws Holder has 2 fields (serial id) so account for it.

Modified:
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java?rev=984964&r1=984963&r2=984964&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
(original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
Thu Aug 12 20:51:47 2010
@@ -20,6 +20,7 @@
 package org.apache.cxf.service.factory;
 
 import java.lang.reflect.Array;
+import java.lang.reflect.Field;
 import java.lang.reflect.GenericArrayType;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
@@ -241,10 +242,16 @@ public class DefaultServiceConfiguration
     
     @Override
     public Boolean isHolder(Class<?> cls, Type type) {
-        if (cls.getSimpleName().equals("Holder")
-            && cls.getDeclaredFields().length == 1
-            && "value".equals(cls.getDeclaredFields()[0].getName())
-            && Modifier.isPublic(cls.getDeclaredFields()[0].getModifiers())) {
+        if (cls.getSimpleName().equals("Holder")) {
+            for (Field f : cls.getDeclaredFields()) {
+                if (Modifier.isStatic(f.getModifiers())) { 
+                    continue;
+                }
+                if (Modifier.isPublic(f.getModifiers())
+                    && "value".equals(f.getName())) {
+                    return Boolean.TRUE;
+                }
+            }
             return Boolean.TRUE;
         }
         return Boolean.FALSE;



Mime
View raw message