RFR: 8285285: Avoid redundant allocations in WindowsPreferences
Andrey Turbanov
aturbanov at openjdk.java.net
Wed Apr 20 19:38:47 UTC 2022
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
-------------
Commit messages:
- [PATCH] Avoid redundant allocations in WindowsPreferences
- [PATCH] Avoid redundant String allocation in WindowsPreferences.toJavaName
Changes: https://git.openjdk.java.net/jdk/pull/8322/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8322&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8285285
Stats: 20 lines in 1 file changed: 0 ins; 2 del; 18 mod
Patch: https://git.openjdk.java.net/jdk/pull/8322.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8322/head:pull/8322
PR: https://git.openjdk.java.net/jdk/pull/8322
More information about the core-libs-dev
mailing list