RFR: 8273375: Remove redundant 'new String' calls after concatenation in java.desktop [v2]

Andrey Turbanov github.com+741251+turbanoff at openjdk.java.net
Wed Sep 8 09:49:25 UTC 2021


> 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.

Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:

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

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5356/files
  - new: https://git.openjdk.java.net/jdk/pull/5356/files/4f70a7e8..a4fd58fe

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5356&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5356&range=00-01

  Stats: 21 lines in 7 files changed: 5 ins; 1 del; 15 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5356.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5356/head:pull/5356

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



More information about the client-libs-dev mailing list