cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r687914 - /cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
Date Fri, 22 Aug 2008 00:33:41 GMT
Author: bimargulies
Date: Thu Aug 21 17:33:41 2008
New Revision: 687914

URL: http://svn.apache.org/viewvc?rev=687914&view=rev
Log:
Oh, try harder not to make this explode.

Modified:
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java?rev=687914&r1=687913&r2=687914&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
Thu Aug 21 17:33:41 2008
@@ -386,10 +386,18 @@
             
             part.setProperty("nillable", Boolean.valueOf(type.isNillable()));
             if (type.hasMinOccurs()) {
-                part.setProperty("minOccurs", Long.valueOf(type.getMinOccurs()).toString());
+                long miValue = type.getMinOccurs();
+                if (miValue != 0) {
+                    part.setProperty("minOccurs", Long.toString(miValue));
+                }
             }
             if (type.hasMaxOccurs()) {
-                part.setProperty("maxOccurs", Long.valueOf(type.getMaxOccurs()).toString());
+                String moValue;
+                long mo = type.getMaxOccurs();
+                if (mo != Long.MAX_VALUE) {
+                    moValue = Long.toString(mo);
+                    part.setProperty("maxOccurs", moValue);
+                }
             }
 
             part2Type.put(part, type);



Mime
View raw message