Code (Pre-)Review for JEP 280: Indify String Concat
Aleksey Shipilev
aleksey.shipilev at oracle.com
Mon Nov 30 13:38:17 UTC 2015
Yes, thanks for more polishing, I have uploaded the updates to:
http://cr.openjdk.java.net/~shade/8085796/webrev.jdk.06/
http://cr.openjdk.java.net/~shade/8085796/webrev.langtools.04/
More reviews, please!
Thanks,
-Aleksey
On 11/30/2015 12:34 PM, Andrej Golovnin wrote:
> Hi Aleksey,
>
>> http://cr.openjdk.java.net/~shade/8085796/webrev.jdk.05/
>
> src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java
>
> 669 final boolean sized;
> 670 final boolean exact;
>
> The fields can be declared private.
>
> test/java/lang/String/concat/ImplicitStringConcat.java
>
> 119 static StringBuffer sb = new StringBuffer();
> 120 static {
> 121 sb.append('a');
> 122 }
>
> This can be rewritten as:
>
> static StringBuffer sb = new StringBuffer().append('a');
>
> or even as:
>
> static StringBuffer sb = new StringBuffer("a");
>
> The result should be the same. But it is easier to read.
>
> Otherwise looks good. And I think you need now a real reviewer. :-)
>
> Best regards,
> Andrej Golovnin
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20151130/6a2bdf03/signature.asc>
More information about the compiler-dev
mailing list