Re: RFR: 8296905: Replace the native LCMS#getProfileID() method with the accessor [v3]

2022-11-28 Thread Phil Race
On Fri, 25 Nov 2022 01:34:26 GMT, Sergey Bylokhov  wrote:

>> The native method used to access the private method in the `ICC_Profile` 
>> class is replaced by the accessor.
>
> Sergey Bylokhov has updated the pull request with a new target base due to a 
> merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains four additional 
> commits since the last revision:
> 
>  - Merge branch 'openjdk:master' into JDK-8296905
>  - Update AWTAccessor.java
>  - Merge remote-tracking branch 'upstream/master' into JDK-8296905
>  - 8296905: Replace the native LCMS#getProfileID() method with the accessor

Marked as reviewed by prr (Reviewer).

-

PR: https://git.openjdk.org/jdk/pull/6


Re: RFR: 8296905: Replace the native LCMS#getProfileID() method with the accessor [v3]

2022-11-24 Thread Sergey Bylokhov
On Fri, 25 Nov 2022 02:21:09 GMT, SWinxy  wrote:

>> Sergey Bylokhov has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains four additional 
>> commits since the last revision:
>> 
>>  - Merge branch 'openjdk:master' into JDK-8296905
>>  - Update AWTAccessor.java
>>  - Merge remote-tracking branch 'upstream/master' into JDK-8296905
>>  - 8296905: Replace the native LCMS#getProfileID() method with the accessor
>
> src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMS.java line 59:
> 
>> 57: if (p instanceof LCMSProfile) {
>> 58: return (LCMSProfile)p;
>> 59: }
> 
> Would be a good time to
> Suggestion:
> 
> if (p instanceof LCMSProfile profile) {
> return profile;
> }

That change is possible but it will be better to do it as a separate cleanup.

-

PR: https://git.openjdk.org/jdk/pull/6


Re: RFR: 8296905: Replace the native LCMS#getProfileID() method with the accessor [v3]

2022-11-24 Thread SWinxy
On Fri, 25 Nov 2022 01:34:26 GMT, Sergey Bylokhov  wrote:

>> The native method used to access the private method in the `ICC_Profile` 
>> class is replaced by the accessor.
>
> Sergey Bylokhov has updated the pull request with a new target base due to a 
> merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains four additional 
> commits since the last revision:
> 
>  - Merge branch 'openjdk:master' into JDK-8296905
>  - Update AWTAccessor.java
>  - Merge remote-tracking branch 'upstream/master' into JDK-8296905
>  - 8296905: Replace the native LCMS#getProfileID() method with the accessor

src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMS.java line 59:

> 57: if (p instanceof LCMSProfile) {
> 58: return (LCMSProfile)p;
> 59: }

Would be a good time to
Suggestion:

if (p instanceof LCMSProfile profile) {
return profile;
}

-

PR: https://git.openjdk.org/jdk/pull/6


Re: RFR: 8296905: Replace the native LCMS#getProfileID() method with the accessor [v3]

2022-11-24 Thread Sergey Bylokhov
> The native method used to access the private method in the `ICC_Profile` 
> class is replaced by the accessor.

Sergey Bylokhov has updated the pull request with a new target base due to a 
merge or a rebase. The incremental webrev excludes the unrelated changes 
brought in by the merge/rebase. The pull request contains four additional 
commits since the last revision:

 - Merge branch 'openjdk:master' into JDK-8296905
 - Update AWTAccessor.java
 - Merge remote-tracking branch 'upstream/master' into JDK-8296905
 - 8296905: Replace the native LCMS#getProfileID() method with the accessor

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/6/files
  - new: https://git.openjdk.org/jdk/pull/6/files/f7b74481..9e7819fb

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk=6=02
 - incr: https://webrevs.openjdk.org/?repo=jdk=6=01-02

  Stats: 26596 lines in 411 files changed: 11421 ins; 4961 del; 10214 mod
  Patch: https://git.openjdk.org/jdk/pull/6.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/6/head:pull/6

PR: https://git.openjdk.org/jdk/pull/6


Re: RFR: 8296905: Replace the native LCMS#getProfileID() method with the accessor [v2]

2022-11-19 Thread Sergey Bylokhov
On Mon, 14 Nov 2022 08:03:40 GMT, Sergey Bylokhov  wrote:

>> src/java.desktop/share/classes/sun/awt/AWTAccessor.java line 891:
>> 
>>> 889:  */
>>> 890: public static ICC_ProfileAccessor getICC_ProfileAccessor() {
>>> 891: if (iccProfileAccessor == null) {
>> 
>> For `SharedSecrets` in java.base code was updated to use single read (to 
>> avoid concurrency problems) - see 
>> [JDK-8259021](https://bugs.openjdk.org/browse/JDK-8259021)
>> Shouldn't we use the same patter here?
>
> Yes, you are right, let me fix that first.

The AWTAccessor and SwingAccessor files are updated by 
https://github.com/mrserb/jdk/commit/c50a9047b4324b280b2b5d1fc70e18aac372a50c. 
This patch now uses the new pattern.

-

PR: https://git.openjdk.org/jdk/pull/6


Re: RFR: 8296905: Replace the native LCMS#getProfileID() method with the accessor [v2]

2022-11-19 Thread Sergey Bylokhov
> The native method used to access the private method in the `ICC_Profile` 
> class is replaced by the accessor.

Sergey Bylokhov has updated the pull request with a new target base due to a 
merge or a rebase. The incremental webrev excludes the unrelated changes 
brought in by the merge/rebase. The pull request contains three additional 
commits since the last revision:

 - Update AWTAccessor.java
 - Merge remote-tracking branch 'upstream/master' into JDK-8296905
 - 8296905: Replace the native LCMS#getProfileID() method with the accessor

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/6/files
  - new: https://git.openjdk.org/jdk/pull/6/files/70b9c147..f7b74481

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk=6=01
 - incr: https://webrevs.openjdk.org/?repo=jdk=6=00-01

  Stats: 27634 lines in 610 files changed: 10928 ins; 14095 del; 2611 mod
  Patch: https://git.openjdk.org/jdk/pull/6.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/6/head:pull/6

PR: https://git.openjdk.org/jdk/pull/6


Re: RFR: 8296905: Replace the native LCMS#getProfileID() method with the accessor

2022-11-14 Thread Sergey Bylokhov
On Sat, 12 Nov 2022 09:18:57 GMT, Andrey Turbanov  wrote:

>> The native method used to access the private method in the `ICC_Profile` 
>> class is replaced by the accessor.
>
> src/java.desktop/share/classes/sun/awt/AWTAccessor.java line 891:
> 
>> 889:  */
>> 890: public static ICC_ProfileAccessor getICC_ProfileAccessor() {
>> 891: if (iccProfileAccessor == null) {
> 
> For `SharedSecrets` in java.base code was updated to use single read (to 
> avoid concurrency problems) - see 
> [JDK-8259021](https://bugs.openjdk.org/browse/JDK-8259021)
> Shouldn't we use the same patter here?

Yes, you are right, let me fix that first.

-

PR: https://git.openjdk.org/jdk/pull/6


Re: RFR: 8296905: Replace the native LCMS#getProfileID() method with the accessor

2022-11-12 Thread Andrey Turbanov
On Sat, 12 Nov 2022 04:13:52 GMT, Sergey Bylokhov  wrote:

> The native method used to access the private method in the `ICC_Profile` 
> class is replaced by the accessor.

src/java.desktop/share/classes/sun/awt/AWTAccessor.java line 891:

> 889:  */
> 890: public static ICC_ProfileAccessor getICC_ProfileAccessor() {
> 891: if (iccProfileAccessor == null) {

For `SharedSecrets` in java.base code was updated to use single read (to avoid 
concurrency problems) - see 
[JDK-8259021](https://bugs.openjdk.org/browse/JDK-8259021)
Shouldn't we use the same patter here?

-

PR: https://git.openjdk.org/jdk/pull/6


RFR: 8296905: Replace the native LCMS#getProfileID() method with the accessor

2022-11-11 Thread Sergey Bylokhov
The native method used to access the private method in the `ICC_Profile` class 
is replaced by the accessor.

-

Commit messages:
 - 8296905: Replace the native LCMS#getProfileID() method with the accessor

Changes: https://git.openjdk.org/jdk/pull/6/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk=6=00
  Issue: https://bugs.openjdk.org/browse/JDK-8296905
  Stats: 77 lines in 5 files changed: 38 ins; 36 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/6.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/6/head:pull/6

PR: https://git.openjdk.org/jdk/pull/6