Make ZipFile.CleanableResource.inflaterCache field final

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: core-libs

      The ZipFile inflaterCache field in ZipFile.CleanableResource.inflaterCache is non-final, used for synchronization and is set to null to indicate that the cache is closed.

      This causes an awkward synchronization dance including double-checking for the null state which is hard to reason about.

      It would be better to make the inflaterCache field final and to model the closed state explicitly with a separate boolean flag.

            Assignee:
            Eirik Bjørsnøs
            Reporter:
            Eirik Bjørsnøs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: