Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/docs/jdk/javadoc/doccheck/DocCheck.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -140,6 +140,9 @@ public void init() {
var baseDir = DOCS_DIR.resolve(DIR);
fileTester.processFiles(baseDir);
files = fileTester.getFiles();
if (html) {
new TidyChecker();
}
}

public List<FileChecker> getCheckers() {
Expand Down
4 changes: 2 additions & 2 deletions test/docs/jdk/javadoc/doccheck/checks/jdkCheckHtml.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -26,6 +26,6 @@
* @bug 8337109
* @summary Check the html in the generated documentation
* @library /test/langtools/tools/lib ../../doccheck /test/lib ../../../../tools/tester
* @build DocTester toolbox.TestRunner
* @build DocTester toolbox.TestRunner jtreg.SkippedException
* @run main/othervm -Ddoccheck.checks=html DocCheck
*/
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -38,6 +38,7 @@
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import jtreg.SkippedException;

public class TidyChecker implements FileChecker, AutoCloseable {
private final Path TIDY;
Expand Down Expand Up @@ -164,8 +165,7 @@ private Path initTidy() {
if (p.isPresent()) {
tidyExePath = p.get();
} else {
System.err.println("tidy not found on PATH");
return Path.of("tidy"); //non-null placeholder return; exception would be better
throw new jtreg.SkippedException("tidy not found on PATH");
}
}

Expand Down