You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Kevin Van Dyck (JIRA)" <xm...@xml.apache.org> on 2010/11/25 11:07:15 UTC

[jira] Commented: (XMLBEANS-317) setXXX(null) on a nil element leaves bean in invalid state

    [ https://issues.apache.org/jira/browse/XMLBEANS-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935707#action_12935707 ] 

Kevin Van Dyck commented on XMLBEANS-317:
-----------------------------------------

any news on this issue? 

> setXXX(null) on a nil element leaves bean in invalid state
> ----------------------------------------------------------
>
>                 Key: XMLBEANS-317
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-317
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: XmlObject
>    Affects Versions: Version 2.2
>         Environment: Java_1.5.0_10 on Windows2000
>            Reporter: Joseph Campolongo
>         Attachments: xmlbeans-317.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org