-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update java-17-openjdk to version 17.0.2.0 / rev 9 via SR 963792
https://build.opensuse.org/request/show/963792 by user fstrba + dimstar_suse Fix an exception in javadoc generation
- Loading branch information
1 parent
9e0b31a
commit 7eb2f0a
Showing
5 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java | ||
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java | ||
@@ -1015,6 +1015,9 @@ public class HtmlDocletWriter { | ||
// @see reference label... | ||
label = ref.subList(1, ref.size()); | ||
} | ||
+ case ERRONEOUS -> { | ||
+ return HtmlTree.SPAN(Text.of(resources.getText("doclet.tag.invalid_input", seeText))); | ||
+ } | ||
default -> | ||
throw new IllegalStateException(ref.get(0).getKind().toString()); | ||
} | ||
--- a/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTag.java | ||
+++ b/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTag.java | ||
@@ -23,15 +23,19 @@ | ||
|
||
/* | ||
* @test | ||
- * @bug 8017191 8182765 8200432 8239804 8250766 8262992 | ||
+ * @bug 8017191 8182765 8200432 8239804 8250766 8262992 8281944 | ||
* @summary Javadoc is confused by at-link to imported classes outside of the set of generated packages | ||
- * @library ../../lib | ||
+ * @library /tools/lib ../../lib | ||
* @modules jdk.javadoc/jdk.javadoc.internal.tool | ||
- * @build javadoc.tester.* | ||
+ * @build toolbox.ToolBox javadoc.tester.* | ||
* @run main TestSeeTag | ||
*/ | ||
|
||
import javadoc.tester.JavadocTester; | ||
+import toolbox.ToolBox; | ||
+ | ||
+import java.io.IOException; | ||
+import java.nio.file.Path; | ||
|
||
public class TestSeeTag extends JavadocTester { | ||
|
||
@@ -105,4 +109,40 @@ public class TestSeeTag extends JavadocTester { | ||
</dd> | ||
</dl>"""); | ||
} | ||
+ | ||
+ ToolBox tb = new ToolBox(); | ||
+ | ||
+ @Test | ||
+ public void testErroneous() throws IOException { | ||
+ Path src = Path.of("erroneous", "src"); | ||
+ tb.writeJavaFiles(src, """ | ||
+ package erroneous; | ||
+ /** | ||
+ * Comment. | ||
+ * @see <a href=" | ||
+ */ | ||
+ public class C { | ||
+ private C() { } | ||
+ } | ||
+ """); | ||
+ | ||
+ javadoc("-d", Path.of("erroneous", "api").toString(), | ||
+ "-sourcepath", src.toString(), | ||
+ "--no-platform-links", | ||
+ "erroneous"); | ||
+ checkExit(Exit.ERROR); | ||
+ | ||
+ checkOutput("erroneous/C.html", true, | ||
+ """ | ||
+ <dl class="notes"> | ||
+ <dt>See Also:</dt> | ||
+ <dd> | ||
+ <ul class="see-list"> | ||
+ <li><span>invalid input: '<a href="'</span></li> | ||
+ </ul> | ||
+ </dd> | ||
+ </dl> | ||
+ """); | ||
+ | ||
+ } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
------------------------------------------------------------------- | ||
Mon Mar 21 20:25:50 UTC 2022 - Fridrich Strba <[email protected]> | ||
|
||
- Added patch: | ||
* JDK-8282944.patch | ||
+ Upstream fix for JDK-8281944: JavaDoc throws | ||
java.lang.IllegalStateException: ERRONEOUS | ||
|
||
------------------------------------------------------------------- | ||
Sun Mar 20 01:08:12 UTC 2022 - Fridrich Strba <[email protected]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters