Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8288692: jdk/javadoc/doclet/testTagMisuse/TestTagMisuse.java fails af…
…ter JDK-8288545

Reviewed-by: prappo
  • Loading branch information
jonathan-gibbons committed Jun 17, 2022
1 parent 97544be commit f12d044
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Expand Up @@ -984,7 +984,13 @@ public Content seeTagToContent(Element element, DocTree see, TagletWriterImpl.Co
case LINK, LINK_PLAIN -> {
// {@link[plain] reference label...}
LinkTree lt = (LinkTree) see;
refText = lt.getReference().toString();
var linkRef = lt.getReference();
if (linkRef == null) {
messages.warning(ch.getDocTreePath(see),"doclet.link.no_reference");
return invalidTagOutput(resources.getText("doclet.tag.invalid_input", lt.toString()),
Optional.empty());
}
refText = linkRef.toString();
label = lt.getLabel();
}

Expand Down
Expand Up @@ -102,6 +102,7 @@ doclet.MalformedURL=Malformed URL: {0}
doclet.File_error=Error reading file: {0}
doclet.URL_error=Error fetching URL: {0}
doclet.Resource_error=Error reading resource: {0}
doclet.link.no_reference=no reference given
doclet.see.class_or_package_not_found=Tag {0}: reference not found: {1}
doclet.see.class_or_package_not_accessible=Tag {0}: reference not accessible: {1}
doclet.see.nested_link=Tag {0}: nested link
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2022, 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 @@ -23,6 +23,7 @@

/*
* @test
* @bug 8035473 8288692
* @summary Determine if proper warning messages are printed.
* @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
Expand Down

0 comments on commit f12d044

Please sign in to comment.