On Tue, 11 Mar 2025 13:31:46 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> Harshitha Onkar has updated the pull request incrementally with one >> additional commit since the last revision: >> >> builtIn converted to transient, tests updated > > test/jdk/java/awt/color/ICC_Profile/BuiltInProfileCheck.java line 69: > >> 67: throw new RuntimeException("Test Failed! IAE NOT >> thrown."); >> 68: } catch (IllegalArgumentException iae) { >> 69: System.out.println("IAE expected: " + iae.getMessage()); > > I'm for keeping the previous version which verified the exception message — > otherwise, how can we distinguish `IllegalArgumentException` for illegal > arguments? > > If we used another exception type, there wouldn't be the need to check on the > message. Reasonable point. Reverted the code to check the msg. On the other hand, test controls the type of arguments (valid arguments) and profile we are sending in to `.setData()` and we know the expected IAE msg in this case is for built-in profile. @prrace I have reverted the test to check the type of exception msg to have a more strict check. IIRC, @jayathirthrao had made same suggestion as @aivanov-jdk for this newly added test. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1989836746