JDK-8256321 : Some "inactive" color profiles use the wrong profile class
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 11,15,16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2020-11-13
  • Updated: 2022-06-01
  • Resolved: 2021-01-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17
11.0.15Fixed 17 b04Fixed
Related Reports
Relates :  
Description
The implementation of ICC_Profile tries to defer loading the data of the color profile, and it uses some predefined values for some profile properties for the standard profiles like sRGB, etc. If the application requests profile data then the ICC_Profile  class activates the profile and uses properties from that data.

Deferring mechanism for all profiles was added in JDK-6793818, but unfortunately, the color profile class was hardcoded incorrectly "CLASS_DISPLAY" for all profiles. However, the "CIEXYZ.pf" and "PYCC.pf" profiles should use "CLASS_COLORSPACECONVERSION".

Later the color "profiles/xxx.pf" were replaced in the JDK, and the actual type of the "CIEXYZ.pf" was changed to the "CLASS_ABSTRACT", but the deferring mechanism still uses "CLASS_DISPLAY".

As a result of this bug, the color profile reports different values before/after activations.
Comments
Fix request (11u) This change is one of the steps to update the CMM deferral machinery, The final goal will be backport this fix:https://bugs.openjdk.java.net/browse/JDK-6986863 The added test is red before the fix and green after. The jdk_desktop tests are green. The patch is not clean due to context conflict only, the code change is the same. PR: https://github.com/openjdk/jdk11u-dev/pull/793
28-01-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/793 Date: 2022-01-25 22:55:41 +0000
25-01-2022

Changeset: a6c08813 Author: Sergey Bylokhov <serb@openjdk.org> Date: 2021-01-05 12:47:33 +0000 URL: https://git.openjdk.java.net/jdk/commit/a6c08813
05-01-2021