On Mon, 3 Mar 2025 18:15:35 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:

> This builtin flag check is exclusively for JDK built-in profiles created 
> within the private interface `BuiltInProfile` and not applicable if an 
> application loads the profile by serialization.

The built-in profiles can be serialized and deserialized, 
[see](https://github.com/openjdk/jdk/blob/c4b516dfe7c5a5fddd4d9c97a21f5f36bf845646/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java#L1573).
 This means the application may get a reference to the profile not only via the 
getInstance(id) method. Therefore, the new spec is not strictly accurate 
regarding ICC_Profile.getInstance(int colorSpaceID), but I am not sure that we 
should mention serialisation here.

**Note:** 
The new Javadoc for the new private built-in flag is "public" via the 
serialized form of the class. It probably should be marked as transient, so it 
will only be set to true when the built-in profile is loaded via serialization. 
In all other cases, it will be false.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1978134779

Reply via email to