Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-5606

Refactor resource closing

    XMLWordPrintable

Details

    • Task
    • Resolution: Won't Do
    • Major
    • None
    • 17.0.0.Final
    • None
    • None

    Description

      Currently some codepoints do a manual safe close without a util library, some code points have custom util methods. Some projects have dependencies to more than one util and use more than one. Some custom utils log the failure, some not. Some standard libraries have a trace on the attempt to close and on the failure, some not. Some close statements lack of proper error handling, some do not free the closed resource.

      Goal: Standardize the closing of resources, close all relevant resources and free them, properly reporting errors. Gain the possibility to trace potential resource leaks.
      java.io.Closeable requires a idempotent behaviour, java.lang.AutoCloseable recommends it.

      Current utilities in use:

      org.xnio.IoUtils.safeClose offers the most complete set of features:

      • Closeable, Closeable..., AutoCloseable
      • null check
      • trace the attempt to close
      • trace the error, if one occurs

      Attachments

        Issue Links

          Activity

            People

              xf01213 Boris Unckel (Inactive)
              xf01213 Boris Unckel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: