Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8273914 Indy string concat changes order of operations
  3. JDK-8279866

Release Note: Indy String Concat Changes Order of Operations

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Delivered
    • Icon: P3 P3
    • 19
    • 8u441-perf, 11.0.27-oracle, 17.0.14-oracle, 19
    • 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"));
        ```

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

                Created:
                Updated:
                Resolved: