Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-351

Need for public interface to check if an XmlObject is orphaned

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • unspecified
    • unspecified
    • XmlObject
    • None
    • XmlBeans

    Description

      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)

      Attachments

        Activity

          People

            Unassigned Unassigned
            mhedenus Michael Hedenus
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: