Release Note: Indy String Concat Changes Order of Operations

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Delivered
    • Priority: P3
    • 19
    • Affects Version/s: 8u441-perf, 11.0.27-oracle, 17.0.14-oracle, 19
    • Component/s: tools

        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"));
        ```

              Assignee:
              Liam Miller-Cushon
              Reporter:
              Liam Miller-Cushon
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: