RFR (S) CR 7177472: JSR292: MethodType interning penalizes scalability (original) (raw)
Christian Thalinger christian.thalinger at oracle.com
Thu Jun 13 19:30:19 UTC 2013
- Previous message: RFR (S) CR 7177472: JSR292: MethodType interning penalizes scalability
- Next message: Inefficient use StringBuffer or StringBuilder[Optimization|clean-up] {Package: con.sun. * java.lang*}
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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) obj).get(); ^ required: WeakEntry 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: 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.
Looks good now. Thanks for the quick turnaround.
-- Chris
-Aleksey.
- Previous message: RFR (S) CR 7177472: JSR292: MethodType interning penalizes scalability
- Next message: Inefficient use StringBuffer or StringBuilder[Optimization|clean-up] {Package: con.sun. * java.lang*}
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]