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

Refactor resource closing

XMLWordPrintable

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

      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

          There are no Sub-Tasks for this issue.

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

                Created:
                Updated:
                Resolved: