On Thu, 30 Apr 2026 19:20:23 GMT, Alexey Ivanov <[email protected]> wrote:

>> test/jdk/java/awt/image/DataBuffer/DataBufferConstructorTest.java line 41:
>> 
>>> 39: 
>>> 40:     static void testByteConstructor(int size,
>>> 41:                                     Class expectedExceptionType) {
>> 
>> Suggestion:
>> 
>>                                     Class<?> expectedExceptionType) {
>> 
>> To silence IDE warnings about raw use of parameterized class Class? Or add 
>> `@SuppressWarnings("rawtypes")` to the test class?
>
> In this particular case, the exception must always be 
> `IllegalArgumentException`, so the `expectedExceptionType` parameter can be 
> removed altogether.
> 
> This applies to tests which pass only size or both size and banks.

I think it better to pass it in regardless.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29766#discussion_r3170744262

Reply via email to