RFR: JDK-8279513: jdk/javadoc/doclet/testDocletExample/TestDocletExample.java fails after 8278795

Jonathan Gibbons jjg at openjdk.java.net
Wed May 25 17:27:49 UTC 2022


On Wed, 25 May 2022 17:19:22 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> Yes. Although we could throw NPE even here, I was wanting to throw something that indicates the test is dysfunctional, as compared to failing or crashing.
>
> The rationale that you provided reminds of `new FileInputStream(java.io.File)` that throws `FileNotFoundException`. Unlike not finding a file, not finding a particular snippet is an unexpected, unrecoverable programming error. I cannot imagine a reasonable test that checks that some snippet is not there.

It's a reasonable analogy.

-------------

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


More information about the compiler-dev mailing list