On Thu, 4 Feb 2021 04:15:03 GMT, Prasanta Sadhukhan <[email protected]>
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 one
> additional commit since the last revision:
>
> Doc change to @throws
Changes requested by serb (Reviewer).
src/java.desktop/share/classes/java/awt/BasicStroke.java line 297:
> 295: * @param s the {@code Shape} boundary be stroked
> 296: * @return the {@code Shape} of the stroked outline.
> 297: * @throws NullPointerException if {@code Shape} is {@code null}
I think that you mean the parameter {@code s}, not a type Shape.
test/jdk/java/awt/BasicStroke/TestNullShape.java line 40:
> 38: System.out.println("result: false");
> 39: }
> 40: catch(NullPointerException ne) {
You can add a space after catch and move it to one line above.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2377