RFR: 8285285: Avoid redundant allocations in WindowsPreferences

Andrey Turbanov aturbanov at openjdk.java.net
Fri Jun 3 20:38:36 UTC 2022


On Wed, 20 Apr 2022 19:16:00 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

> 1. No need to call `String.substring` if you need need to compare start of string with some constant. `String.startWith` suites better.
> 2. Unused String array is allocated in `childrenNamesSpi` method

I believe it's pretty obvious changes. I will integrate at Monday, if there will be no more comments.

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

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


More information about the core-libs-dev mailing list