Hi Phil, > That is true .. although I think I have previously been convinced that IAE > is generally the better choice for such a case, I found only deriveFont > that throws IAE for null in this file. > So the question is whether to be consistent or to start picking the better > option. > So if there were no existing IAEs or NPEs in this file, which would you > choose now ?
From my standpoint of view you should use NPE. And maybe java.util.Objects.requireNonNull() may help you to answer this question if you rewrite your code to use it instead of doing manual check. :-) Best regards, Andrej Golovnin