On Thu, 20 Feb 2025 14:42:04 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> Harshitha Onkar has updated the pull request incrementally with one >> additional commit since the last revision: >> >> javadoc change > > src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 1164: > >> 1162: * array can not be interpreted as valid tag data, >> corresponding to >> 1163: * the {@code tagSignature} >> 1164: * @throws IllegalArgumentException if this is a profile for one >> of the > > `IllegalStateException` better describes the reason: the argument to the > method can be perfectly valid, but the internal state of the object doesn't > allow modifications. @aivanov-jdk _IllegalStateException - Signals that a method has been invoked at an **illegal or inappropriate time.**_ Since IllegalStateException is thrown to indicate more of an unstable state of object, it may not be what we want here. The exception is to be thrown when the ICC_Profile object invoking .setData() is JDK Built-in profile and IIlegalArgumentException more closely match this case. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1964122293