cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r984966 - in /cxf/branches/2.2.x-fixes: ./ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
Date Thu, 12 Aug 2010 20:53:16 GMT
Author: dkulp
Date: Thu Aug 12 20:53:16 2010
New Revision: 984966

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

........
  r984964 | dkulp | 2010-08-12 16:51:47 -0400 (Thu, 12 Aug 2010) | 1 line
  
  The 2.2 jax-ws Holder has 2 fields (serial id) so account for it.
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java

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

Modified: cxf/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java?rev=984966&r1=984965&r2=984966&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
Thu Aug 12 20:53:16 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