You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlbeans-cvs@xml.apache.org by da...@apache.org on 2004/01/23 23:32:21 UTC
cvs commit: xml-xmlbeans/v1/test/src/enumtest enumtest.xsd
daveremy 2004/01/23 14:32:21
Modified: v1/src/typeimpl/org/apache/xmlbeans/impl/schema Tag:
xmlbeans-1-0-1_branch SchemaTypeCodePrinter.java
v1/test/src/enumtest Tag: xmlbeans-1-0-1_branch enumtest.xsd
Log:
Fix up a few spots where we were generating Object instead of
java.lang.Object.
Submitted by: Kevin Krouse
Reviewed by: David Bau
DRT: passed
Revision Changes Path
No revision
No revision
1.3.2.1 +3 -3 xml-xmlbeans/v1/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java
Index: SchemaTypeCodePrinter.java
===================================================================
RCS file: /home/cvs/xml-xmlbeans/v1/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- SchemaTypeCodePrinter.java 12 Nov 2003 16:45:53 -0000 1.3
+++ SchemaTypeCodePrinter.java 23 Jan 2004 22:32:21 -0000 1.3.2.1
@@ -296,7 +296,7 @@
emit("private static final org.apache.xmlbeans.SchemaTypeSystem loadTypeSystem()");
emit("{");
indent();
- emit("try { return (org.apache.xmlbeans.SchemaTypeSystem)Class.forName(\"org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl\", true, " + shortName + ".class.getClassLoader()).getConstructor(new Class[] { Class.class }).newInstance(new Object[] { " + shortName + ".class }); }");
+ emit("try { return (org.apache.xmlbeans.SchemaTypeSystem)Class.forName(\"org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl\", true, " + shortName + ".class.getClassLoader()).getConstructor(new Class[] { Class.class }).newInstance(new java.lang.Object[] { " + shortName + ".class }); }");
emit("catch (ClassNotFoundException e) { throw new RuntimeException(\"Cannot load org.apache.xmlbeans.impl.SchemaTypeSystemImpl: make sure xbean.jar is on the classpath.\", e); }");
emit("catch (Exception e) { throw new RuntimeException(\"Could not instantiate SchemaTypeSystemImpl (\" + e.toString() + \"): is the version of xbean.jar correct?\", e); }");
outdent();
@@ -827,7 +827,7 @@
outdent();
emit(");");
emit("private static final long serialVersionUID = 1L;");
- emit("private Object readResolve() { return forInt(intValue()); } ");
+ emit("private java.lang.Object readResolve() { return forInt(intValue()); } ");
outdent();
emit("}");
}
@@ -1355,7 +1355,7 @@
break;
case SchemaProperty.JAVA_OBJECT:
- emit("Object[] result = new Object[targetList.size()];");
+ emit("java.lang.Object[] result = new java.lang.Object[targetList.size()];");
emit("for (int i = 0, len = targetList.size() ; i < len ; i++)");
emit(" result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getObjectValue();");
break;
No revision
No revision
1.1.2.1 +9 -1 xml-xmlbeans/v1/test/src/enumtest/enumtest.xsd
Index: enumtest.xsd
===================================================================
RCS file: /home/cvs/xml-xmlbeans/v1/test/src/enumtest/enumtest.xsd,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- enumtest.xsd 15 Sep 2003 18:20:46 -0000 1.1
+++ enumtest.xsd 23 Jan 2004 22:32:21 -0000 1.1.2.1
@@ -37,5 +37,13 @@
</xs:sequence>
</xs:complexType>
</xs:element>
-
+
+ <!-- bug CR128906: gen'd java code must qualify java.lang.* types -->
+ <xs:simpleType name="object">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="abc"/>
+ <xs:enumeration value="def"/>
+ </xs:restriction>
+ </xs:simpleType>
+
</xs:schema>
---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-cvs-help@xml.apache.org