RFR (XS) 8060485: (str) contentEquals checks the String contents twice on mismatch

Alan Bateman Alan.Bateman at oracle.com
Tue Oct 14 19:55:59 UTC 2014

On 14/10/2014 18:38, Aleksey Shipilev wrote:
> Thanks guys!
> And of course, I managed to do two minor mistakes in a two-line change:
> the indentation is a bit wrong, and cast to String is redundant. Here is
> the updated webrev and the changeset (need a Sponsor!):
>    http://cr.openjdk.java.net/~shade/8060485/webrev.01/
>    http://cr.openjdk.java.net/~shade/8060485/8060485.changeset
> -Aleksey.
Updated version looks okay. I wonder how common it might be to call this 
method with String vs. a StringBuilder, just wondering if it should 
check for a String first (although the type check should be really quick 
and probably wouldn't make a difference).


More information about the core-libs-dev mailing list