cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r806981 - in /cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory: AbstractServiceConfiguration.java DefaultServiceConfiguration.java
Date Sun, 23 Aug 2009 14:35:12 GMT
Author: bimargulies
Date: Sun Aug 23 14:35:12 2009
New Revision: 806981

URL: http://svn.apache.org/viewvc?rev=806981&view=rev
Log:
CXF-2402: revert changes to AbstractServiceConfiguration, remove
exemption for basic type from DefaultServiceConfiguration instead. There's
nothing wrong with minOccurs=1 on a string, so long as you have set nillable
to false.

Modified:
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/AbstractServiceConfiguration.java
    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/AbstractServiceConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/AbstractServiceConfiguration.java?rev=806981&r1=806980&r2=806981&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/AbstractServiceConfiguration.java
(original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/AbstractServiceConfiguration.java
Sun Aug 23 14:35:12 2009
@@ -189,34 +189,17 @@
         return null;
     }
     
-    /**
-     * If Aegis is at work, the XML can render a wrapper part non-nillable.
-     * @param mpi part
-     * @return nillability
-     */
     public Boolean isWrapperPartNillable(MessagePartInfo mpi) {
-        return (Boolean)mpi.getProperty("nillable");
+        return null;
     }
     
     public Boolean isWrapperPartQualified(MessagePartInfo mpi) {
         return null;
     }
     public Long getWrapperPartMaxOccurs(MessagePartInfo mpi) {
-        String miString = (String)mpi.getProperty("maxOccurs");
-        if (miString != null) {
-            if ("unbounded".equals(miString)) {
-                return Long.MAX_VALUE;
-            } else {
-                return Long.valueOf(miString, 10);
-            }
-        }
         return null;
     }
     public Long getWrapperPartMinOccurs(MessagePartInfo mpi) {
-        String miString = (String)mpi.getProperty("minOccurs");
-        if (miString != null) {
-            return Long.valueOf(miString, 10);
-        }
         return null;
     }
 }

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=806981&r1=806980&r2=806981&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
Sun Aug 23 14:35:12 2009
@@ -288,33 +288,24 @@
     public Boolean isWrapperPartNillable(MessagePartInfo mpi) {
         return (Boolean)mpi.getProperty("nillable");
     }
+    
     public Long getWrapperPartMaxOccurs(MessagePartInfo mpi) {
-        String max = (String)mpi.getProperty("maxOccurs");
-        long maxi = 1;
-        if (max == null) {
-            if (mpi.getTypeClass() != null && mpi.getTypeClass().isArray()
-                && !Byte.TYPE.equals(mpi.getTypeClass().getComponentType())) {
-                maxi = Long.MAX_VALUE;
+        String miString = (String)mpi.getProperty("maxOccurs");
+        if (miString != null) {
+            if ("unbounded".equals(miString)) {
+                return Long.MAX_VALUE;
+            } else {
+                return Long.valueOf(miString, 10);
             }
-        } else {
-            maxi = "unbounded".equals(max) ? Long.MAX_VALUE : Long.parseLong(max);
         }
-        return maxi;
+        return null;
     }
+    
     public Long getWrapperPartMinOccurs(MessagePartInfo mpi) {
-        String min = (String)mpi.getProperty("minOccurs");
-        
-        long mini = 1;
-        
-        if (min != null) {
-            mini = Long.parseLong(min);
+        String miString = (String)mpi.getProperty("minOccurs");
+        if (miString != null) {
+            return Long.valueOf(miString, 10);
         }
-        
-        if (min == null && mpi.getTypeClass() != null && !mpi.getTypeClass().isPrimitive())
{
-            mini = 0;
-        }
-        return mini;
+        return null;
     }
-
-    
 }



Mime
View raw message