test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java
changeset 53391 a99bd2570660
parent 53097 2e82ca64b25d
child 53558 fc5a68ff2c0b
--- a/test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java	Fri Jan 18 13:49:45 2019 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java	Fri Jan 18 11:26:30 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -115,6 +115,7 @@
         );
 
         String out1_html4 = "out1-html4";
+        setAutomaticCheckLinks(false); // The example code has toy/bad links
         javadoc("-d", out1_html4,
                 "-source", "8",
                 "-html4",
@@ -134,6 +135,8 @@
                 + "<a href=\"#createTempFile-java.lang.String-java.lang.String-java.io.File-\">"
                 + "<code>createTempFile(prefix,&nbsp;suffix,&nbsp;null)</code></a></code>.</div>");
 
+        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";
@@ -182,6 +185,7 @@
         );
 
         // check multiple linkoffline options
+        setAutomaticCheckLinks(false); // The example code has toy/bad links
         javadoc("-d", "out6",
                 "-sourcepath", testSrc,
                 "-linkoffline", "../copy/out1", "out1",
@@ -200,6 +204,8 @@
                         + "title=\"class or interface in mylib.lang\" class=\"externalLink\">"
                         + "<code>link to mylib.lang.StringBuilderChild</code></a>.</div>\n"
         );
+
+        setAutomaticCheckLinks(true); // re-enable checks
     }
 
     /*