Details
-
Sub-task
-
Resolution: Delivered
-
P3
-
19
Description
String concatenation has been changed to evaluate each argument and eagerly convert it to a string, in left-to-right order. This fixes a bug in the invokedynamic-based string concatentation strategies introduced in [JEP 280](http://openjdk.java.net/jeps/280).
For example, the following now prints `"foofoobar"`, not `"foobarfoobar"`:
```
StringBuilder builder = new StringBuilder("foo");
System.err.println("" + builder + builder.append("bar"));
```
For example, the following now prints `"foofoobar"`, not `"foobarfoobar"`:
```
StringBuilder builder = new StringBuilder("foo");
System.err.println("" + builder + builder.append("bar"));
```