On Tue, 9 Feb 2021 18:10:44 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
>>> Also, if there is no clip set, then the spec statement " If s is null, this >>> method clears the current Clip" does not carry any meaning, so in both >>> regard, setClip() should be there, I presume. >> >> The old javadoc is definitely does not conform the current behavior. But as >> of now it clearly says that it will throw NPE if null argument passed. > > Looks like this is just a bug in the implementation, the null should reset > the clip. I am not sure if it's implementation bug. As Jim Graham has mentioned in thebug, > clip(null) is not legal. > > It is *setClip*(null) that clears the clip. I could rephrase the doc to specify NPE willbe thrrown for null Shape if a clip is already set. ------------- PR: https://git.openjdk.java.net/jdk/pull/2476