RFR: 8283801: Cleanup confusing String.toString calls

Brian Burkhalter bpb at openjdk.java.net
Mon Mar 28 20:14:48 UTC 2022


On Sun, 20 Mar 2022 13:20:31 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

> String.toString() calls doesn't make much sense. Only one place, where it could be used - to generate NPE. But in a few places of JDK codebase it's called, even when NPE will happen anyway.
> I propose to cleanup such places.
> Found by IntelliJ IDEA inspection `Redundant 'String' operation`.

Likewise, please add a `noreg-` label to the issue, perhaps `noreg-cleanup`. Otherwise fine.

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

Marked as reviewed by bpb (Reviewer).

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


More information about the core-libs-dev mailing list