You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Michael Hedenus (JIRA)" <xm...@xml.apache.org> on 2007/11/13 10:46:52 UTC

[jira] Created: (XMLBEANS-351) Need for public interface to check if an XmlObject is orphaned

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.
-
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