Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v10]

2021-02-19 Thread Alexander Zvegintsev
On Wed, 17 Feb 2021 15:54:22 GMT, Prasanta Sadhukhan wrote: >> The API doc for Graphics2D.clip(shape s) claims that passing a null argument >> would actually clear the existing clipping area, which is incorrect. >> This statement is applicable only to G2D.setClip() and not for the clip() >>

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v10]

2021-02-19 Thread Alexander Zuev
On Wed, 17 Feb 2021 15:54:22 GMT, Prasanta Sadhukhan wrote: >> The API doc for Graphics2D.clip(shape s) claims that passing a null argument >> would actually clear the existing clipping area, which is incorrect. >> This statement is applicable only to G2D.setClip() and not for the clip() >>

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v10]

2021-02-17 Thread Prasanta Sadhukhan
On Wed, 17 Feb 2021 15:55:04 GMT, Alexey Ivanov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> javadoc change > > Marked as reviewed by aivanov (Reviewer). Thanks @aivanov-jdk . Would you mind adding

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v10]

2021-02-17 Thread Alexey Ivanov
On Wed, 17 Feb 2021 15:54:22 GMT, Prasanta Sadhukhan wrote: >> The API doc for Graphics2D.clip(shape s) claims that passing a null argument >> would actually clear the existing clipping area, which is incorrect. >> This statement is applicable only to G2D.setClip() and not for the clip() >>

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v9]

2021-02-17 Thread Alexey Ivanov
On Wed, 17 Feb 2021 15:48:12 GMT, Prasanta Sadhukhan wrote: >> The API doc for Graphics2D.clip(shape s) claims that passing a null argument >> would actually clear the existing clipping area, which is incorrect. >> This statement is applicable only to G2D.setClip() and not for the clip() >>

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v10]

2021-02-17 Thread Prasanta Sadhukhan
> The API doc for Graphics2D.clip(shape s) claims that passing a null argument > would actually clear the existing clipping area, which is incorrect. > This statement is applicable only to G2D.setClip() and not for the clip() > method. G2D.clip() would throw a NullPointerException when it

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v8]

2021-02-17 Thread Alexey Ivanov
On Wed, 17 Feb 2021 15:38:10 GMT, Prasanta Sadhukhan wrote: >> The API doc for Graphics2D.clip(shape s) claims that passing a null argument >> would actually clear the existing clipping area, which is incorrect. >> This statement is applicable only to G2D.setClip() and not for the clip() >>

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v9]

2021-02-17 Thread Prasanta Sadhukhan
> The API doc for Graphics2D.clip(shape s) claims that passing a null argument > would actually clear the existing clipping area, which is incorrect. > This statement is applicable only to G2D.setClip() and not for the clip() > method. G2D.clip() would throw a NullPointerException when it

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v7]

2021-02-17 Thread Prasanta Sadhukhan
On Wed, 17 Feb 2021 15:25:35 GMT, Alexey Ivanov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> javadoc change > > src/java.desktop/share/classes/java/awt/Graphics2D.java line 1206: > >> 1204: * with

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v8]

2021-02-17 Thread Prasanta Sadhukhan
> The API doc for Graphics2D.clip(shape s) claims that passing a null argument > would actually clear the existing clipping area, which is incorrect. > This statement is applicable only to G2D.setClip() and not for the clip() > method. G2D.clip() would throw a NullPointerException when it

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v7]

2021-02-17 Thread Alexey Ivanov
On Wed, 17 Feb 2021 15:08:58 GMT, Prasanta Sadhukhan wrote: >> The API doc for Graphics2D.clip(shape s) claims that passing a null argument >> would actually clear the existing clipping area, which is incorrect. >> This statement is applicable only to G2D.setClip() and not for the clip() >>

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v6]

2021-02-17 Thread Prasanta Sadhukhan
On Wed, 17 Feb 2021 14:20:47 GMT, Alexey Ivanov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> javdoc tag for NPE > > src/java.desktop/share/classes/java/awt/Graphics2D.java line 1205: > >> 1203: *

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v7]

2021-02-17 Thread Prasanta Sadhukhan
> The API doc for Graphics2D.clip(shape s) claims that passing a null argument > would actually clear the existing clipping area, which is incorrect. > This statement is applicable only to G2D.setClip() and not for the clip() > method. G2D.clip() would throw a NullPointerException when it

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v6]

2021-02-17 Thread Alexey Ivanov
On Mon, 15 Feb 2021 12:48:01 GMT, Prasanta Sadhukhan wrote: >> The API doc for Graphics2D.clip(shape s) claims that passing a null argument >> would actually clear the existing clipping area, which is incorrect. >> This statement is applicable only to G2D.setClip() and not for the clip() >>

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method

2021-02-16 Thread Prasanta Sadhukhan
On Mon, 15 Feb 2021 12:44:28 GMT, Prasanta Sadhukhan wrote: >> The API doc for Graphics2D.clip(shape s) claims that passing a null argument >> would actually clear the existing clipping area, which is incorrect. >> This statement is applicable only to G2D.setClip() and not for the clip() >>

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v5]

2021-02-15 Thread Prasanta Sadhukhan
On Fri, 12 Feb 2021 14:42:30 GMT, Alexey Ivanov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review comment fix. Test updated > > src/java.desktop/share/classes/java/awt/Graphics2D.java line 1204: > >>

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method

2021-02-15 Thread Prasanta Sadhukhan
On Tue, 9 Feb 2021 11:57:44 GMT, Prasanta Sadhukhan wrote: > The API doc for Graphics2D.clip(shape s) claims that passing a null argument > would actually clear the existing clipping area, which is incorrect. > This statement is applicable only to G2D.setClip() and not for the clip() >

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v6]

2021-02-15 Thread Prasanta Sadhukhan
> The API doc for Graphics2D.clip(shape s) claims that passing a null argument > would actually clear the existing clipping area, which is incorrect. > This statement is applicable only to G2D.setClip() and not for the clip() > method. G2D.clip() would throw a NullPointerException when it

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v5]

2021-02-12 Thread Alexey Ivanov
On Thu, 11 Feb 2021 15:44:57 GMT, Prasanta Sadhukhan wrote: >> The API doc for Graphics2D.clip(shape s) claims that passing a null argument >> would actually clear the existing clipping area, which is incorrect. >> This statement is applicable only to G2D.setClip() and not for the clip() >>

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v5]

2021-02-11 Thread Prasanta Sadhukhan
> The API doc for Graphics2D.clip(shape s) claims that passing a null argument > would actually clear the existing clipping area, which is incorrect. > This statement is applicable only to G2D.setClip() and not for the clip() > method. G2D.clip() would throw a NullPointerException when it

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v4]

2021-02-11 Thread Alexander Zvegintsev
On Thu, 11 Feb 2021 04:14:54 GMT, Prasanta Sadhukhan wrote: >> The API doc for Graphics2D.clip(shape s) claims that passing a null argument >> would actually clear the existing clipping area, which is incorrect. >> This statement is applicable only to G2D.setClip() and not for the clip() >>

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v4]

2021-02-10 Thread Prasanta Sadhukhan
> The API doc for Graphics2D.clip(shape s) claims that passing a null argument > would actually clear the existing clipping area, which is incorrect. > This statement is applicable only to G2D.setClip() and not for the clip() > method. G2D.clip() would throw a NullPointerException when it

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v3]

2021-02-10 Thread Phil Race
On Wed, 10 Feb 2021 18:46:33 GMT, Phil Race wrote: >> From what I can tell, if clip is null, then calling clip(null) has no effect. >> And it won't throw an NPE in that case. So the proposed documentation is >> less accurate than no documentation at all. >> And I would shy away from changing

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v3]

2021-02-10 Thread Phil Race
On Wed, 10 Feb 2021 18:30:18 GMT, Phil Race wrote: >> As per code >> public void setClip(Shape sh) { >> usrClip = transformShape(sh); >> >> usrClip is set to null if "sh" is null so clip is cleared...I will update >> the setClip doc too.. > > From what I can tell, if clip is null,

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v3]

2021-02-10 Thread Phil Race
On Wed, 10 Feb 2021 06:01:59 GMT, Prasanta Sadhukhan wrote: >> The API doc for Graphics2D.clip(shape s) claims that passing a null argument >> would actually clear the existing clipping area, which is incorrect. >> This statement is applicable only to G2D.setClip() and not for the clip() >>

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v3]

2021-02-10 Thread Phil Race
On Wed, 10 Feb 2021 04:51:33 GMT, Prasanta Sadhukhan wrote: >> If "*setClip*(null)" has to clear the clip then it should be specified, >> currently, that method said nothing about the null parameter. > > As per code > public void setClip(Shape sh) { > usrClip = transformShape(sh); >

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v3]

2021-02-09 Thread Prasanta Sadhukhan
> The API doc for Graphics2D.clip(shape s) claims that passing a null argument > would actually clear the existing clipping area, which is incorrect. > This statement is applicable only to G2D.setClip() and not for the clip() > method. G2D.clip() would throw a NullPointerException when it

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method [v2]

2021-02-09 Thread Prasanta Sadhukhan
> The API doc for Graphics2D.clip(shape s) claims that passing a null argument > would actually clear the existing clipping area, which is incorrect. > This statement is applicable only to G2D.setClip() and not for the clip() > method. G2D.clip() would throw a NullPointerException when it

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method

2021-02-09 Thread Prasanta Sadhukhan
On Wed, 10 Feb 2021 04:47:05 GMT, Sergey Bylokhov wrote: >> 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

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method

2021-02-09 Thread Sergey Bylokhov
On Wed, 10 Feb 2021 04:26:17 GMT, Prasanta Sadhukhan wrote: >> 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

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method

2021-02-09 Thread Prasanta Sadhukhan
On Tue, 9 Feb 2021 18:10:44 GMT, Sergey Bylokhov 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

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method

2021-02-09 Thread Sergey Bylokhov
On Tue, 9 Feb 2021 13:59:32 GMT, Alexander Zvegintsev wrote: >> @prsadhuk At first glance i also thought clip() should be called after >> calling setClip() but that is not the case. >> >> If we see SunGraphics2D implementation of clip() we dont exit if there is no >> clip(usrClip object) is

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method

2021-02-09 Thread Alexander Zvegintsev
On Tue, 9 Feb 2021 13:13:51 GMT, Jayathirth D V 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. > > @prsadhuk At first glance i also

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method

2021-02-09 Thread Jayathirth D V
On Tue, 9 Feb 2021 12:54:26 GMT, Prasanta Sadhukhan wrote: >> The spec says "s - the Shape to be intersected with the current Clip" so I >> assume it means there should be a current clip set, so that is why I have >> used setClip to "set" a clip. So, setClip() should be there as far I see. >

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method

2021-02-09 Thread Prasanta Sadhukhan
On Tue, 9 Feb 2021 12:52:55 GMT, Prasanta Sadhukhan wrote: >> src/java.desktop/share/classes/java/awt/Graphics2D.java line 1206: >> >>> 1204: * @param s the {@code Shape} to be intersected with the current >>> 1205: * {@code Clip}. >>> 1206: * @throws

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method

2021-02-09 Thread Prasanta Sadhukhan
On Tue, 9 Feb 2021 12:48:44 GMT, Alexander Zvegintsev wrote: >> The API doc for Graphics2D.clip(shape s) claims that passing a null argument >> would actually clear the existing clipping area, which is incorrect. >> This statement is applicable only to G2D.setClip() and not for the clip() >>

Re: [OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method

2021-02-09 Thread Alexander Zvegintsev
On Tue, 9 Feb 2021 11:57:44 GMT, Prasanta Sadhukhan wrote: > The API doc for Graphics2D.clip(shape s) claims that passing a null argument > would actually clear the existing clipping area, which is incorrect. > This statement is applicable only to G2D.setClip() and not for the clip() >

[OpenJDK 2D-Dev] RFR: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method

2021-02-09 Thread Prasanta Sadhukhan
The API doc for Graphics2D.clip(shape s) claims that passing a null argument would actually clear the existing clipping area, which is incorrect. This statement is applicable only to G2D.setClip() and not for the clip() method. G2D.clip() would throw a NullPointerException when it encounters a