[jdk11u-dev] RFR: 8273914: Indy string concat changes order of operations [v4]
Andrew John Hughes
andrew at openjdk.org
Sat Jan 11 21:38:48 UTC 2025
On Tue, 19 Nov 2024 17:09:19 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:
>> This is a backport of [JDK-8273914: Indy string concat changes order of operations](https://bugs.openjdk.org/browse/JDK-8273914).
>>
>> The patch applied cleanly. I downgrade the class file major version in the `.jasm` test inputs for compatibility with JDK 11.
>>
>> Testing: tier1 langtools tests
>
> Liam Miller-Cushon has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>
> - Merge remote-tracking branch 'upstream/master' into backport-JDK-8273914
> - Downgrade major version for jasm test inputs
> - Merge remote-tracking branch 'upstream/master' into backport-JDK-8273914
> - Backport cfee4512f7048e9cf440078e9eb87d37c7ebcdd9
Backport looks good (near clean) and issue is fixed:
~~~
$ cat T.java
class T {
static String test() {
StringBuilder builder = new StringBuilder("foo");
return "" + builder + builder.append("bar");
}
public static void main(String[] args) {
System.err.println(test());
}
}
$ $HOME/build/openjdk11/bin/javac -version
javac 11.0.18-internal
$ $HOME/build/openjdk11/bin/javac T.java
$ $HOME/build/openjdk11/bin/java T
foobarfoobar
$ $HOME/builder/11u-dev/images/jdk/bin/javac -version
javac 11.0.26-internal
$ $HOME/builder/11u-dev/images/jdk/bin/javac T.java
$ $HOME/build/openjdk11/bin/java T
foofoobar
~~~
jtreg tests in `test/langtools/tools/javac/StringConcat` and `test/hotspot/jtreg/runtime/modules/AccessCheck` pass
-------------
Marked as reviewed by andrew (Reviewer).
PR Review: https://git.openjdk.org/jdk11u-dev/pull/2933#pullrequestreview-2545288223
More information about the jdk-updates-dev
mailing list