On Fri, 26 Mar 2021 22:45:56 GMT, Phil Race <[email protected]> wrote:
>> src/java.desktop/share/classes/java/awt/image/ComponentSampleModel.java line
>> 127:
>>
>>> 125: * @throws IllegalArgumentException if {@code pixelStride} is less
>>> than 0
>>> 126: * @throws IllegalArgumentException if {@code scanlineStride} is
>>> less than 0
>>> 127: * @throws NullPointerException if {@code bandOffsets} is {@code
>>> null}
>>
>> I like the NPE here, but probably it makes sense to use the same exception
>> for all errors? "IllegalArgumentException "
>
> Meaning even though you like the NPE you would change it to IAE like the rest
> ?
Yes and no, I just wanted to highlight this place, since somebody may prefer
IAE here.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3223