On Thu, 4 Feb 2021 04:15:03 GMT, Prasanta Sadhukhan <psadhuk...@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 one > additional commit since the last revision: > > Doc change to @throws test/jdk/java/awt/BasicStroke/TestNullShape.java line 44: > 42: return; > 43: } > 44: throw new RuntimeException("NPE is expected"); I would suggest moving this into the try-block as it would make the intention clearer: if NPE is not thrown, it's a failure. Also catch should be on the same line as the closing brace of try. ------------- PR: https://git.openjdk.java.net/jdk/pull/2377