7092897: sun.security.util.Cache should be generified (original) (raw)

Xuelei Fan xuelei.fan at oracle.com
Tue Oct 18 03:07:25 UTC 2011


I only have a few very minor suggestions.

in sun/security/util/Cache.java: -> 264 this.queue = soft ? new ReferenceQueue() : null; ^ I would like to remove the generic "V" in the right side of the assignment: 264 this.queue = soft ? new ReferenceQueue<>() : null;

-> 255 private final ReferenceQueue queue; ^

From my first look at the update, I think the real generic type should be "CacheEntry<K,V>", instead of "V". However, because SoftCacheEntry class need to extend SoftReference, we have to use a dummy type "V" here. I was wondering we may want to add a line or two comments here.

Otherwise, looks fine to me.

Xuelei

On 10/18/2011 2:51 AM, Sean Mullan wrote:

Hi Xuelei,

Would you be able to review this fix? http://cr.openjdk.java.net/~mullan/webrevs/7092897/webrev.00/ Thanks, Sean



More information about the security-dev mailing list