Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Version 2.2
-
None
-
None
-
Java_1.5.0_10 on Windows2000
Description
Given the following schema
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:element name="TestSet">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string"/>
<xs:element name="More">
<xs:complexType>
<xs:sequence>
<xs:element name="MoreName" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
the following code will fail if assertions are enabled:
TestSetDocument doc = TestSetDocument.Factory.newInstance();
TestSet testSet = doc.addNewTestSet();
testSet.setMore(null);
testSet.setMore(null);
testSet.validate();
while it will succeed if assertions are disabled.
The exception is
at org.apache.xmlbeans.impl.values.XmlObjectBase.build_text(XmlObjectBase.java:837)
at org.apache.xmlbeans.impl.store.Xobj.ensureOccupancy(Xobj.java:1694)
at org.apache.xmlbeans.impl.store.Cur.next(Cur.java:1444)
at org.apache.xmlbeans.impl.store.Validate.process(Validate.java:74)
at org.apache.xmlbeans.impl.store.Validate.<init>(Validate.java:39)
at org.apache.xmlbeans.impl.store.Xobj.validate(Xobj.java:1860)
at org.apache.xmlbeans.impl.values.XmlObjectBase.validate(XmlObjectBase.java:343)
I will attach a test case.