Re: RFR: 8283711: Remove redundant 'new String' calls after concatenation
On Sun, 20 Mar 2022 12:07:52 GMT, Andrey Turbanov wrote: > Result of string concatenation is a newly created String object. There is no > need it wrap it in another 'new String' call. > Such calls are confusing and produce warnings in IDE. Without them code is > easier to read. > Similar cleanup > [JDK-8273375](https://bugs.openjdk.java.net/browse/JDK-8273375) in > java.desktop Good catches! - Marked as reviewed by xuelei (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7876
Re: RFR: 8283711: Remove redundant 'new String' calls after concatenation
On Sun, 20 Mar 2022 12:07:52 GMT, Andrey Turbanov wrote: > Result of string concatenation is a newly created String object. There is no > need it wrap it in another 'new String' call. > Such calls are confusing and produce warnings in IDE. Without them code is > easier to read. > Similar cleanup > [JDK-8273375](https://bugs.openjdk.java.net/browse/JDK-8273375) in > java.desktop the compiler changes looks good - Marked as reviewed by vromero (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7876
Re: RFR: 8283711: Remove redundant 'new String' calls after concatenation
On Sun, 20 Mar 2022 12:07:52 GMT, Andrey Turbanov wrote: > Result of string concatenation is a newly created String object. There is no > need it wrap it in another 'new String' call. > Such calls are confusing and produce warnings in IDE. Without them code is > easier to read. > Similar cleanup > [JDK-8273375](https://bugs.openjdk.java.net/browse/JDK-8273375) in > java.desktop LGTM. - Marked as reviewed by wetmore (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7876
RFR: 8283711: Remove redundant 'new String' calls after concatenation
Result of string concatenation is a newly created String object. There is no need it wrap it in another 'new String' call. Such calls are confusing and produce warnings in IDE. Without them code is easier to read. Similar cleanup [JDK-8273375](https://bugs.openjdk.java.net/browse/JDK-8273375) in java.desktop - Commit messages: - [PATCH] Remove redundant 'new String' calls after concatenation - [PATCH] Remove redundant 'new String' calls after concatenation Changes: https://git.openjdk.java.net/jdk/pull/7876/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7876&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8283711 Stats: 13 lines in 3 files changed: 0 ins; 1 del; 12 mod Patch: https://git.openjdk.java.net/jdk/pull/7876.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7876/head:pull/7876 PR: https://git.openjdk.java.net/jdk/pull/7876