lujun commented on XMLBEANS-351:

> Need for public interface to check if an XmlObject is orphaned
> --------------------------------------------------------------
>                 Key: XMLBEANS-351
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-351
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: XmlObject
>    Affects Versions: unspecified
>         Environment: XmlBeans
>            Reporter: Michael Hedenus
>             Fix For: unspecified
> Currently there is no public interface to check if an XmlObject is orphaned; 
> there is only a protected method in XmlObjectBase. Consider following 
> situation:
> 1) The XmlBeans data model is display by a GUI (e.g. JTree).
> 2) The data model is changed, e.g. an element is deleted.
> 3) The GUI is repainting but the element that shall be displayed is orphaned 
> and an exception is thrown. This exception must be caught to keep the GUI in 
> a valid state or even alive.
> The last point is the reason why I consider the problem as a bug.
> Of course it is always possible to surround the accessing of XmlBeans with 
> try-catch but I think this is neither the intention nor a good solution.
> I propose two possible solutions:
> 1) instance method for XmlObject: isOrphaned()
> 2) static utility function: XmlBeans.isOrphaned(XmlObject)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to