diff --git a/test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java b/test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java
index ac8284653fd..fedcb7c85ea 100644
--- a/test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java
+++ b/test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java
@@ -104,8 +104,8 @@ public class TestLinkOption extends JavadocTester {
"RFC 2396: Uniform\n" +
" Resource Identifiers (URI): Generic Syntax, " +
"
RFC 2732: Format for\n" +
- " Literal IPv6 Addresses in URLs,
" +
- "URISyntaxException\n" +
+ " Literal IPv6 Addresses in URLs,
" +
+ "A nearby file\n" +
"");
checkOutput("mylib/lang/StringBuilderChild.html", true,
@@ -115,7 +115,6 @@ public class TestLinkOption extends JavadocTester {
);
String out1_html4 = "out1-html4";
- setAutomaticCheckLinks(false); // The example code has toy/bad links
javadoc("-d", out1_html4,
"-source", "8",
"-html4",
@@ -135,8 +134,6 @@ public class TestLinkOption extends JavadocTester {
+ ""
+ "createTempFile(prefix, suffix, null).");
- setAutomaticCheckLinks(true); // re-enable checks
-
// Generate the documentation using -linkoffline and a relative path as the first parameter.
// We will try linking to the docs generated in test 1 with a relative path.
String out2 = "out2";
diff --git a/test/langtools/jdk/javadoc/doclet/testLinkOption/pkg/B.java b/test/langtools/jdk/javadoc/doclet/testLinkOption/pkg/B.java
index 141cf936775..2545b0e086b 100644
--- a/test/langtools/jdk/javadoc/doclet/testLinkOption/pkg/B.java
+++ b/test/langtools/jdk/javadoc/doclet/testLinkOption/pkg/B.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, 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
@@ -60,7 +60,7 @@ public class B {
* Resource Identifiers (URI): Generic Syntax,
RFC 2732: Format for
* Literal IPv6 Addresses in URLs,
URISyntaxException
+ * href="C.html">A nearby file
*/
public void externalLink() {}
}