Skip to content

Commit

Permalink
ArrayCache: use custom Key type to circumvent interning
Browse files Browse the repository at this point in the history
Because the JVM caches Integer objects, if Integer is useed as the key
of a weak HashMap, some entries will never be released. This commit
changes to use a ArrayCacheSizeKey type, which does not have interning.
This is prefered to creating unique Integer instances with `new` as this
constructor is deprecated.

fixes #484
  • Loading branch information
wirew0rm authored and RalphSteinhagen committed Jul 20, 2022
1 parent 7a6a4e2 commit c79cec4
Showing 1 changed file with 103 additions and 71 deletions.
Loading

0 comments on commit c79cec4

Please sign in to comment.