Code (Pre-)Review for JEP 280: Indify String Concat

Andrej Golovnin andrej.golovnin at
Mon Nov 30 09:34:02 UTC 2015

Hi Aleksey,



 669         final boolean sized;
 670         final boolean exact;

The fields can be declared private.


 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

More information about the compiler-dev mailing list