# HG changeset patch # User mchung # Date 1529990829 25200 # Node ID e92d48cf94f9a2090713a744e6ac469b0a358a07 # Parent 9f781ce22e7d821731456a5dcf7225fd3516284c 8205627: Replace hardcoded spec version value in build.tools.ExtLink taglet Reviewed-by: jjg, erikj diff -r 9f781ce22e7d -r e92d48cf94f9 make/Docs.gmk --- a/make/Docs.gmk Mon Jun 25 20:58:01 2018 -0700 +++ b/make/Docs.gmk Mon Jun 25 22:27:09 2018 -0700 @@ -327,7 +327,8 @@ ) 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 diff -r 9f781ce22e7d -r e92d48cf94f9 make/jdk/src/classes/build/tools/taglet/ExtLink.java --- a/make/jdk/src/classes/build/tools/taglet/ExtLink.java Mon Jun 25 20:58:01 2018 -0700 +++ b/make/jdk/src/classes/build/tools/taglet/ExtLink.java Mon Jun 25 22:27:09 2018 -0700 @@ -37,7 +37,6 @@ 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 @@ * } */ 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*)(?\\w+)(\\s+)(?.*)$"); + /** * Returns the set of locations in which the tag may be used. */