On 22/07/2016 14:13, Peter Levart wrote:

:

The changes are very straightforward. They preserve the general structure of the logic. I renamed the CacheKey nested class to LoadSession as it now only functions as a mutable object passed around the methods while executing the getBundle() process. LoadSession is now a factory for ClassLoaderValue cache key. I moved the loadTime and expirationTime fields from LoadSession (old CacheKey) to ResourceBundle. As each cached entry must maintain it's own loadTime/expirationTime, I changed the NONEXISTENT_BUNDLE constant into a private subclass of ResourceBundle. The back-link from ResourceBundle to CacheKey is not needed any more. There is a backlink from BundleReference to ClassLoaderValue key and the associated ClassLoader to enable expunging.
Not a comment on the the ResourceBundle changes but I think it would be generally useful if we moved CLV jdk.internal.<somewhere> so that it can be used by other code in java.base. I had cause to do this recently when prototyping something in a completely different area recently.

-Alan.

Reply via email to