Uploaded image for project: 'JDO'
  1. JDO
  2. JDO-776

Exception on Query.close()

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • JDO 3.2
    • None
    • api
    • None

    Description

      The Query interface has an exception thrown on the close() method. This prevents elegant use of try-with-resource and requires more complex cases instead, such as try within try, or try-with-resource with catch. In both cases, the code gets rather ugly when using try-with-resource.

       

      The closeAll() method however, does not throw an exception which allows for simpler, more elegant code. Users should be encouraged to use modern language constructs, but in the case of the Query interface, I prefer not to, and use closeAll instead.

       

      Propose: Remove the Exception from Query.close(). If an exception is thrown while closing it, ignore it.

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            sspringett Steve Springett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: