-
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.
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.
- links to
-
Review(master)
openjdk/jdk/29937