RFR: 6211126: ICC_ColorSpace.toCIEXYZ(float[]): NPE is not specified
Phil Race
prr at openjdk.org
Tue Jul 11 22:02:18 UTC 2023
On Tue, 11 Jul 2023 00:52:50 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
> The specification of some methods has been updated to include current behaviour on null.
I think this is OK. The two things that popped into my head were
(1) Should the abstract methods in ColorSpace really dictate what the concrete methods should do, but
(a) We already do some of that
(b) it is hard to imagine a scenario in which the args aren't needed so NPE would only be averted if some implementation decided to handle it in an unlikely way
(2) should the concrete methods explicitly check for null and immediately throw NPE but (b) above should mean it isn't needed, and the AIOBE cases seem like they might be the ones that need it more but don't seem to have an explicit check.
-------------
Marked as reviewed by prr (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/14821#pullrequestreview-1525214060
More information about the client-libs-dev
mailing list