Re: RFR: 8283801: Cleanup confusing String.toString calls

2022-03-30 Thread Andrey Turbanov
On Sun, 20 Mar 2022 13:20:31 GMT, Andrey Turbanov 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. > Foun

Re: RFR: 8283801: Cleanup confusing String.toString calls

2022-03-28 Thread Brian Burkhalter
On Sun, 20 Mar 2022 13:20:31 GMT, Andrey Turbanov 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. > Foun

RFR: 8283801: Cleanup confusing String.toString calls

2022-03-28 Thread Andrey Turbanov
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`. --