[OpenJDK 2D-Dev] RFR: 6211257: BasicStroke.createStrokedShape(Shape): NPE is not specified [v3]
Alexey Ivanov
aivanov at openjdk.java.net
Mon Feb 8 10:55:42 UTC 2021
On Sun, 7 Feb 2021 09:18:04 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> Method createStrokedShape(Shape) for java.awt.BasicStroke class throws NullPointerException when passed a null object reference for a input parameter but it's not specified in the spec.
>> Updated spec to illustrate this.
>
> Prasanta Sadhukhan has updated the pull request incrementally with three additional commits since the last revision:
>
> - Address review comments
> - Revert "Address review comments"
>
> This reverts commit 3fff74d7563a6141d67cb18fd7c3dda731a4c752.
> - Address review comments
Marked as reviewed by aivanov (Reviewer).
test/jdk/java/awt/BasicStroke/TestNullShape.java line 42:
> 40: } catch (NullPointerException ne) {
> 41: System.out.println("result (npe): true");
> 42: return;
Return is from catch is redundant now.
Suggestion:
-------------
PR: https://git.openjdk.java.net/jdk/pull/2377
More information about the 2d-dev
mailing list