Integrated: 8273375: Remove redundant 'new String' calls after concatenation in java.desktop

Andrey Turbanov github.com+741251+turbanoff at openjdk.java.net
Wed Sep 8 14:31:14 UTC 2021


On Fri, 3 Sep 2021 07:53:21 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> 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.

This pull request has now been integrated.

Changeset: 59c9f750
Author:    Andrey Turbanov <turbanoff at gmail.com>
Committer: Alexey Ivanov <aivanov at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/59c9f750414e4f131c906a5bc20f32f2f9cfe9ec
Stats:     96 lines in 15 files changed: 13 ins; 3 del; 80 mod

8273375: Remove redundant 'new String' calls after concatenation in java.desktop

Reviewed-by: aivanov

-------------

PR: https://git.openjdk.java.net/jdk/pull/5356



More information about the client-libs-dev mailing list