8180019: javadoc should treat failure to access URL as an error, not a warning

Reviewed-by: jjg
This commit is contained in:
Kumar Srinivasan 2017-11-21 13:17:06 -08:00
parent 7fe35f784b
commit 2af00f5da9
3 changed files with 6 additions and 7 deletions

View File

@ -223,7 +223,7 @@ public class Extern {
}
return true;
} catch (Fault f) {
reporter.print(Diagnostic.Kind.WARNING, f.getMessage());
reporter.print(Diagnostic.Kind.ERROR, f.getMessage());
return false;
}
}

View File

@ -23,8 +23,8 @@
/*
* @test
* @bug 4625883
* @summary Make sure that bad -link arguments trigger warnings.
* @bug 4625883 8180019
* @summary Make sure that bad -link arguments trigger errors.
* @author jamieh
* @library ../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@ -44,11 +44,10 @@ public class TestBadLinkOption extends JavadocTester {
String out = "out";
javadoc("-d", out,
"-sourcepath", testSrc,
"-link", out,
"-link", "a-non-existent-link",
"pkg");
checkExit(Exit.OK);
checkExit(Exit.ERROR);
// TODO: the file it is trying to read, out/out/package-list, warrants investigation
checkOutput(Output.OUT, true,
"Error reading file:");
}

View File

@ -44,7 +44,7 @@ public class TestNewLineInLink extends JavadocTester {
void test() {
javadoc("-d", "out",
"-sourcepath", testSrc,
"-linkoffline", "http://www.java.sun.com/j2se/1.4/docs/api", testSrc,
"-linkoffline", "http://www.java.sun.com/j2se/1.4/docs/api", testSrc("jdk"),
"testNewLineInLink");
checkExit(Exit.OK);