Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
Version 5.0.2
-
None
-
None
Description
There is a patch for making XmlCursor and AutoCloseable to land on trunk later, it takes into account that cursor used to instantiate XmlError must not be closed for example in a try-with-resources construct.
Maybe there is no problem of holding the cursors inside the XmlError indefinitely until the entire document is garbage collected, asking here about this, but I think that instead of XmlError using client code avoiding closing cursors, XmlError should create defensive copies of them in order to always client code close the cursors they create, for API consistency reasons.