RFR (S) CR 7177472: JSR292: MethodType interning penalizes scalability
christian.thalinger at oracle.com
Thu Jun 13 19:30:19 UTC 2013
On Jun 13, 2013, at 12:09 PM, Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:
> 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?)
More or less. I'm only building java/lang/invoke plus friends and use -Xlint:unchecked.
> , 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:
> This seems a trivial change, so I only tested java/lang/invoke
> regression tests afterwards, those are OK.
Looks good now. Thanks for the quick turnaround.
More information about the core-libs-dev