RFR: 8357287: Unify usage of ICC profile "header size" constants in CMM-related code
Harshitha Onkar
honkar at openjdk.org
Wed May 21 17:09:53 UTC 2025
On Tue, 20 May 2025 00:37:15 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
> Small unification of "header size" constants, as of now the CMM code uses:
> 1. sun.java2d.cmm.ProfileDataVerifier.HEADER_SIZE introduced in JDK-8013430
> 2. java.awt.color.ICC_Profile.HEADER_SIZE introduced in [JDK-8347377](https://bugs.openjdk.org/browse/JDK-8347377)
> 3. Hardcoded literal 128
LGTM
src/java.desktop/share/classes/sun/java2d/cmm/ProfileDataVerifier.java line 111:
> 109: public static final int HEADER_SIZE = 128;
> 110: private static final int TOC_OFFSET = HEADER_SIZE + 4;
> 111: private static final int TOC_RECORD_SIZE = 12;
Minor: All the constants are defined at the end of file, is it better to move them to the beginning ?
-------------
Marked as reviewed by honkar (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/25313#pullrequestreview-2858535241
PR Review Comment: https://git.openjdk.org/jdk/pull/25313#discussion_r2100782673
More information about the client-libs-dev
mailing list