Hi Mandy,
I just noticed the following (have been thinking of it already, but then
forgot) in original code:
/*
512 * Note that we need not worry about reaping the cache for
513 * entries with cleared weak references because if a proxy
class
514 * has been garbage collected, its class loader will have been
515 * garbage collected as well, so the entire cache will be
reaped
516 * from the loaderToCache map.
517 */
Each ClassLoader maintains explicit hard-references to all Class objects
for classes defined by the loader. So proxy Class object can not be
GC-ed until the ClassLoader is GC-ed. So we need not register the
CacheValue objects in WeakCache with a refQueue. The expunging of
reverseMap entries is already performed with CacheKey when it is cleared
and equeued. There's no harm as it is, since the clean-up is performed
with all the checks and is idempotent, but it need not be done for
ClassValue objects holding weak references to proxy Class objects.
I'll do that change to WeakCache in next webrev together with any other
possible changes that might be needed.
Regards, Peter
On 04/19/2013 05:43 PM, Peter Levart wrote:
On 04/19/2013 04:36 PM, Peter Levart wrote:
http://dl.dropboxusercontent.com/u/101777488/jdk8-tl/proxy-wc-wi/webrev.01/index.html
Hi Mandy,
I changed the copyright header of WeakCache to GPLv2 with ClassPath
exception and corrected a minor formatting inconsistency:
http://dl.dropboxusercontent.com/u/101777488/jdk8-tl/proxy-wc-wi/webrev.02/index.html
Regards, Peter