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() 
>> method. G2D.clip() would throw a NullPointerException when it encounters a 
>> null argument. 
>> Updated spec to rectify this.
>
> 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 1207:

> 1205:  * with the current clip, it will throw {@code NullPointerException}
> 1206:  * for a null shape unless the user clip is also {@code null}.
> 1207:  * So calling this method with a null argument is not recommended.

This suggestion still applies too.
Suggestion:

 * for a {@code null} shape unless the user clip is also {@code null}.
 * So calling this method with a {@code null} argument is not recommended.

-

PR: https://git.openjdk.java.net/jdk/pull/2476


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 encounters a 
> null argument. 
> Updated spec to rectify this.

Prasanta Sadhukhan has updated the pull request incrementally with one 
additional commit since the last revision:

  javadoc change

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2476/files
  - new: https://git.openjdk.java.net/jdk/pull/2476/files/530cad4d..3a1faf33

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=2476=07
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=2476=06-07

  Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2476.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2476/head:pull/2476

PR: https://git.openjdk.java.net/jdk/pull/2476