[OpenJDK 2D-Dev] RFR: 8255800: Raster creation methods need some specification clean up
Sergey Bylokhov
serb at openjdk.java.net
Wed Mar 31 21:26:13 UTC 2021
On Fri, 26 Mar 2021 22:45:56 GMT, Phil Race <prr at openjdk.org> 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
More information about the 2d-dev
mailing list