mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-11 14:11:36 +00:00
8205627: Replace hardcoded spec version value in build.tools.ExtLink taglet
Reviewed-by: jjg, erikj
This commit is contained in:
parent
5ef2f98d35
commit
140e7415ff
@ -327,7 +327,8 @@ define SetupApiDocsGenerationBody
|
||||
)
|
||||
|
||||
ifeq ($$($1_JAVADOC_CMD), )
|
||||
$1_JAVADOC_CMD := $$(JAVA) -Djava.awt.headless=true $$($1_JAVA_ARGS) \
|
||||
$1_JAVADOC_CMD := $$(JAVA) -Djava.awt.headless=true \
|
||||
-Dextlink.spec.version=$$(VERSION_SPECIFICATION) $$($1_JAVA_ARGS) \
|
||||
$$(NEW_JAVADOC)
|
||||
endif
|
||||
|
||||
|
||||
@ -37,7 +37,6 @@ import com.sun.source.doctree.UnknownInlineTagTree;
|
||||
import jdk.javadoc.doclet.Taglet;
|
||||
|
||||
import static com.sun.source.doctree.DocTree.Kind.*;
|
||||
import static jdk.javadoc.doclet.Taglet.Location.*;
|
||||
|
||||
/**
|
||||
* An inline tag to conveniently insert an external link.
|
||||
@ -53,13 +52,23 @@ import static jdk.javadoc.doclet.Taglet.Location.*;
|
||||
* }
|
||||
*/
|
||||
public class ExtLink implements Taglet {
|
||||
static final String SPEC_VERSION;
|
||||
|
||||
static {
|
||||
SPEC_VERSION = System.getProperty("extlink.spec.version");
|
||||
if (SPEC_VERSION == null) {
|
||||
throw new RuntimeException("extlink.spec.version property not set");
|
||||
}
|
||||
}
|
||||
|
||||
static final String TAG_NAME = "extLink";
|
||||
|
||||
static final String URL = "https://www.oracle.com/pls/topic/lookup?ctx=javase10&id=";
|
||||
static final String URL = "https://www.oracle.com/pls/topic/lookup?ctx=javase" +
|
||||
SPEC_VERSION + "&id=";
|
||||
|
||||
static final Pattern TAG_PATTERN = Pattern.compile("(?s)(\\s*)(?<name>\\w+)(\\s+)(?<desc>.*)$");
|
||||
|
||||
|
||||
/**
|
||||
* Returns the set of locations in which the tag may be used.
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user