Re: RFR: 8285285: Avoid redundant allocations in WindowsPreferences

2022-06-06 Thread Andrey Turbanov
On Wed, 20 Apr 2022 19:16:00 GMT, Andrey Turbanov  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

Thank you for review!

-

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


Re: RFR: 8285285: Avoid redundant allocations in WindowsPreferences

2022-06-03 Thread Andrey Turbanov
On Wed, 20 Apr 2022 19:16:00 GMT, Andrey Turbanov  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


Re: RFR: 8285285: Avoid redundant allocations in WindowsPreferences

2022-05-10 Thread Jaikiran Pai
On Wed, 20 Apr 2022 19:16:00 GMT, Andrey Turbanov  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

Marked as reviewed by jpai (Committer).

I don't have knowledge of this area, but these changes look good to me.

-

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


RFR: 8285285: Avoid redundant allocations in WindowsPreferences

2022-04-20 Thread Andrey Turbanov
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=8322=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