junit-team / junit4

A programmer-oriented testing framework for Java.
https://junit.org/junit4
Eclipse Public License 1.0
8.53k stars 3.29k forks source link

Build failure with OpenJDK 17 #1696

Open ebourg opened 3 years ago

ebourg commented 3 years ago

There is a build failure with OpenJDK 17 caused by javadoc errors:

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /<<PKGBUILDDIR>>/src/main/java/org/junit/runners/Parameterized.java:[125,3] error: heading used out of sequence: <H3>, compared to implicit preceding heading: <H1>
[ERROR] /<<PKGBUILDDIR>>/src/main/java/org/junit/Test.java:[31,3] error: heading used out of sequence: <H3>, compared to implicit preceding heading: <H1>
[ERROR] /<<PKGBUILDDIR>>/src/main/java/org/junit/ClassRule.java:[34,3] error: heading used out of sequence: <H3>, compared to implicit preceding heading: <H1>
[ERROR] /<<PKGBUILDDIR>>/src/main/java/org/junit/rules/ExpectedException.java:[19,3] error: heading used out of sequence: <H3>, compared to implicit preceding heading: <H1>
[ERROR] /<<PKGBUILDDIR>>/src/main/java/org/junit/Rule.java:[26,3] error: heading used out of sequence: <H3>, compared to implicit preceding heading: <H1>
[INFO] 5 errors
marcphilipp commented 3 years ago

Thanks for reporting it! Do you have time to submit a PR to fix it?

ebourg commented 3 years ago

The easiest solution is to disable doclint, by setting -Xdoclint:none there https://github.com/junit-team/junit4/blob/main/pom.xml#L536 and below

marcphilipp commented 3 years ago

@ebourg I misunderstood your original report to mean that it failed for you in a dependent project that somehow references JUnit classes in its Javadoc. What Maven commandline did you use to get the above output?