On 06/13/2013 09:51 PM, Christian Thalinger wrote: > While preparing the push I noticed the new code gives a warning: > > src/share/classes/java/lang/invoke/MethodType.java:1106: warning: [unchecked] > unchecked cast > T that = ((WeakEntry<T>) obj).get(); > ^ > required: WeakEntry<T> > found: Object > where T is a type-variable: > T extends Object declared in class WeakEntry > 1 warning > > Could you fix that, please?
Can't reproduce that warning in my builds (are you having -Xlint:unchecked enabled in the new build system somehow?), but good catch! There is the preceding instanceof check that ought to make this cast safe now. Also we don't need to declare locals as T in equals(). Please try this: http://cr.openjdk.java.net/~shade/7177472/webrev.03/ This seems a trivial change, so I only tested java/lang/invoke regression tests afterwards, those are OK. -Aleksey.