[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlbeans-dev
Subject: [jira] Updated: (XMLBEANS-317) setXXX(null) on a nil element leaves
From: "Joseph Campolongo (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date: 2007-03-02 21:55:52
Message-ID: 13322928.1172872552234.JavaMail.jira () brutus
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/XMLBEANS-317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]
Joseph Campolongo updated XMLBEANS-317:
---------------------------------------
Attachment: xmlbeans-317.zip
Drop xmlbean-2.2.0.jar and jsr173_api-1.0.jar in the lib folder and run ant to build.
This is a set of 7 tests, 6 of which all fail at the same place when assertions are \
enabled (at an assert), but pass when assertions are disabled.
> 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic