Code (Pre-)Review for JEP 280: Indify String Concat
Andrej Golovnin
andrej.golovnin at gmail.com
Mon Nov 30 09:34:02 UTC 2015
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
More information about the core-libs-dev
mailing list