[OpenJDK 2D-Dev] RFR: 6211257: BasicStroke.createStrokedShape(Shape): NPE is not specified
Sergey Bylokhov
serb at openjdk.java.net
Wed Feb 3 23:54:54 UTC 2021
On Wed, 3 Feb 2021 12:11:40 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.
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: * @exception NullPointerException if {@code Shape} is {@code null}
We use "@throws" in the new code.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2377
More information about the 2d-dev
mailing list