Skip to content

Commit

Permalink
8280835: jdk/javadoc/tool/CheckManPageOptions.java depends on source …
Browse files Browse the repository at this point in the history
…hierarchy

Reviewed-by: hannesw
  • Loading branch information
jonathan-gibbons committed Jan 27, 2022
1 parent ece89c6 commit 6d242e4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/langtools/jdk/javadoc/tool/CheckManPageOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,14 @@
* of the javadoc man page against the set of options declared in the source code.
*/
public class CheckManPageOptions {
static class SourceDirNotFound extends Error { }

public static void main(String... args) throws Exception {
new CheckManPageOptions().run(args);
try {
new CheckManPageOptions().run(args);
} catch (SourceDirNotFound e) {
System.err.println("NOTE: Cannot find src directory; test skipped");
}
}

static final PrintStream out = System.err;
Expand Down Expand Up @@ -143,7 +149,7 @@ Path findRootDir() {
}
dir = dir.getParent();
}
throw new IllegalStateException("cannot find root dir");
throw new SourceDirNotFound();
}

List<String> getToolOptions() throws Error {
Expand Down

1 comment on commit 6d242e4

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.