geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r517202 - /geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/generator/XsdGenerator.java
Date Mon, 12 Mar 2007 13:17:05 GMT
Author: gnodet
Date: Mon Mar 12 06:17:04 2007
New Revision: 517202

URL: http://svn.apache.org/viewvc?view=rev&rev=517202
Log:
Fix xsd generation for maps

Modified:
    geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/generator/XsdGenerator.java

Modified: geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/generator/XsdGenerator.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/generator/XsdGenerator.java?view=diff&rev=517202&r1=517201&r2=517202
==============================================================================
--- geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/generator/XsdGenerator.java
(original)
+++ geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/generator/XsdGenerator.java
Mon Mar 12 06:17:04 2007
@@ -177,7 +177,7 @@
         } else {
             types = Utils.findImplementationsOf(namespaceMapping, type);
         }
-        String maxOccurs = type.isCollection() ? "unbounded" : "1";
+        String maxOccurs = type.isCollection() || "java.util.Map".equals(type.getName())
? "unbounded" : "1";
 
         out.println("        <xs:element name='" + attributeMapping.getAttributeName()
+ "' minOccurs='0' maxOccurs='1'>");
         if (!isEmptyString(attributeMapping.getDescription())) {



Mime
View raw message