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

Make XmlCursor AutoCloseable

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • Version 5.1.0
    • Cursor
    • None

    Description

      In order to help users forgetting to dispose instances of XmlCursor, It could be changed to be an AutoCloseable so IDE's are able to detect them not being disposed and recommend the try with resources pattern.

      This will involve renaming the dispose() method to close() and creating a deprecated method named as the old one dispose() on all XmlCursor implementations.

      If this is agreed to be a good change, I can prepare a patch for it.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            robmv Robert Marcano
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10m
                10m

                Slack

                  Issue deployment