On Thu, 17 Nov 2022 14:15:52 GMT, Hannes Wallnöfer <[email protected]> wrote:
> Please review the addition of a new JavaDoc test to check the version of 3rd
> party libraries in legal files against the versions of actual library code.
> The skeleton for this test (mostly looking up files in the source tree) was
> taken from `CheckManPageOptions.java`. The test uses a regular expression to
> extract the name and version of 3rd party libraries in the `share/legal`
> directory and then matches these strings against the contents of the actual
> library files.
>
> The 3rd party libraries currently in use by JavaDoc are jQuery and jQuery-UI
> so the test infrastructure has some bits that facilitate JavaScript code such
> as support for both minified and unprocessed files, but it should work
> equally well for Java and other code.
Approved, with an optional comment about code style
test/langtools/jdk/javadoc/doclet/checkLibraryVersions/CheckLibraryVersions.java
line 61:
> 59: new CheckLibraryVersions().run(args);
> 60: } catch (SourceDirNotFound e) {
> 61: System.err.println("NOTE: Cannot find src directory; test
> skipped");
These days, it is common practice (but not required) to throw
`jtreg.SkippedException` to convey this info.
-------------
Marked as reviewed by jjg (Reviewer).
PR: https://git.openjdk.org/jdk/pull/11211