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

Backport-of: 6d242e406539e97bdd4da82c478db901942b770f
  • Loading branch information
Andrew Lu committed May 14, 2024
1 parent 8f0fa10 commit e0dba38
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 @@ -150,7 +156,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 e0dba38

@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.