mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8252712: move doclint to jdk.javadoc module
Reviewed-by: hannesw
This commit is contained in:
parent
c21690b518
commit
f765a7f513
104 changed files with 642 additions and 533 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 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
|
||||
|
@ -25,422 +25,55 @@
|
|||
|
||||
package com.sun.tools.doclint;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
import java.util.ServiceLoader;
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
import javax.tools.StandardLocation;
|
||||
|
||||
import com.sun.source.doctree.DocCommentTree;
|
||||
import com.sun.source.tree.BlockTree;
|
||||
import com.sun.source.tree.ClassTree;
|
||||
import com.sun.source.tree.CompilationUnitTree;
|
||||
import com.sun.source.tree.LambdaExpressionTree;
|
||||
import com.sun.source.tree.ModuleTree;
|
||||
import com.sun.source.tree.PackageTree;
|
||||
import com.sun.source.tree.MethodTree;
|
||||
import com.sun.source.tree.Tree;
|
||||
import com.sun.source.tree.VariableTree;
|
||||
import com.sun.source.util.JavacTask;
|
||||
import com.sun.source.util.Plugin;
|
||||
import com.sun.source.util.TaskEvent;
|
||||
import com.sun.source.util.TaskListener;
|
||||
import com.sun.source.util.TreePath;
|
||||
import com.sun.source.util.TreePathScanner;
|
||||
import com.sun.tools.javac.api.JavacTaskImpl;
|
||||
import com.sun.tools.javac.api.JavacTool;
|
||||
import com.sun.tools.javac.file.JavacFileManager;
|
||||
import com.sun.tools.javac.main.JavaCompiler;
|
||||
import com.sun.tools.javac.util.Context;
|
||||
import com.sun.tools.javac.util.DefinedBy;
|
||||
import com.sun.tools.javac.util.DefinedBy.Api;
|
||||
|
||||
/**
|
||||
* Multi-function entry point for the doc check utility.
|
||||
*
|
||||
* This class can be invoked in the following ways:
|
||||
* <ul>
|
||||
* <li>From the command line
|
||||
* <li>From javac, as a plugin
|
||||
* <li>Directly, via a simple API
|
||||
* </ul>
|
||||
*
|
||||
* <p><b>This is NOT part of any supported API.
|
||||
* If you write code that depends on this, you do so at your own
|
||||
* risk. This code and its internal interfaces are subject to change
|
||||
* or deletion without notice.</b></p>
|
||||
*/
|
||||
public class DocLint implements Plugin {
|
||||
|
||||
public abstract class DocLint implements Plugin {
|
||||
public static final String XMSGS_OPTION = "-Xmsgs";
|
||||
public static final String XMSGS_CUSTOM_PREFIX = "-Xmsgs:";
|
||||
private static final String STATS = "-stats";
|
||||
public static final String XCUSTOM_TAGS_PREFIX = "-XcustomTags:";
|
||||
public static final String XHTML_VERSION_PREFIX = "-XhtmlVersion:";
|
||||
public static final String XCHECK_PACKAGE = "-XcheckPackage:";
|
||||
public static final String SEPARATOR = ",";
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="Command-line entry point">
|
||||
public static void main(String... args) {
|
||||
DocLint dl = new DocLint();
|
||||
try {
|
||||
dl.run(args);
|
||||
} catch (BadArgs e) {
|
||||
System.err.println(e.getMessage());
|
||||
System.exit(1);
|
||||
} catch (IOException e) {
|
||||
System.err.println(dl.localize("dc.main.ioerror", e.getLocalizedMessage()));
|
||||
System.exit(2);
|
||||
private static ServiceLoader.Provider<DocLint> docLintProvider;
|
||||
|
||||
public abstract boolean isValidOption(String opt);
|
||||
|
||||
public static synchronized DocLint newDocLint() {
|
||||
if (docLintProvider == null) {
|
||||
docLintProvider = ServiceLoader.load(DocLint.class).stream()
|
||||
.filter(p_ -> p_.get().getName().equals("doclint"))
|
||||
.findFirst()
|
||||
.orElse(new ServiceLoader.Provider<>() {
|
||||
@Override
|
||||
public Class<? extends DocLint> type() {
|
||||
return NoDocLint.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DocLint get() {
|
||||
return new NoDocLint();
|
||||
}
|
||||
});
|
||||
}
|
||||
return docLintProvider.get();
|
||||
}
|
||||
|
||||
// </editor-fold>
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="Simple API">
|
||||
|
||||
public class BadArgs extends Exception {
|
||||
private static final long serialVersionUID = 0;
|
||||
BadArgs(String code, Object... args) {
|
||||
super(localize(code, args));
|
||||
this.code = code;
|
||||
this.args = args;
|
||||
private static class NoDocLint extends DocLint {
|
||||
@Override
|
||||
public String getName() {
|
||||
return "doclint-not-available";
|
||||
}
|
||||
|
||||
final String code;
|
||||
final transient Object[] args;
|
||||
}
|
||||
@Override
|
||||
public void init(JavacTask task, String... args) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple API entry point.
|
||||
* @param args Options and operands for doclint
|
||||
* @throws BadArgs if an error is detected in any args
|
||||
* @throws IOException if there are problems with any of the file arguments
|
||||
*/
|
||||
public void run(String... args) throws BadArgs, IOException {
|
||||
PrintWriter out = new PrintWriter(System.out);
|
||||
try {
|
||||
run(out, args);
|
||||
} finally {
|
||||
out.flush();
|
||||
@Override
|
||||
public boolean isValidOption(String s) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void run(PrintWriter out, String... args) throws BadArgs, IOException {
|
||||
env = new Env();
|
||||
processArgs(args);
|
||||
|
||||
boolean noFiles = javacFiles.isEmpty();
|
||||
if (needHelp) {
|
||||
showHelp(out);
|
||||
if (noFiles)
|
||||
return;
|
||||
} else if (noFiles) {
|
||||
out.println(localize("dc.main.no.files.given"));
|
||||
return;
|
||||
}
|
||||
|
||||
JavacTool tool = JavacTool.create();
|
||||
|
||||
JavacFileManager fm = new JavacFileManager(new Context(), false, null);
|
||||
fm.setSymbolFileEnabled(false);
|
||||
if (javacBootClassPath != null) {
|
||||
fm.setLocation(StandardLocation.PLATFORM_CLASS_PATH, javacBootClassPath);
|
||||
}
|
||||
if (javacClassPath != null) {
|
||||
fm.setLocation(StandardLocation.CLASS_PATH, javacClassPath);
|
||||
}
|
||||
if (javacSourcePath != null) {
|
||||
fm.setLocation(StandardLocation.SOURCE_PATH, javacSourcePath);
|
||||
}
|
||||
|
||||
JavacTask task = tool.getTask(out, fm, null, javacOpts, null,
|
||||
fm.getJavaFileObjectsFromFiles(javacFiles));
|
||||
Iterable<? extends CompilationUnitTree> units = task.parse();
|
||||
((JavacTaskImpl) task).enter();
|
||||
|
||||
env.init(task);
|
||||
checker = new Checker(env);
|
||||
|
||||
DeclScanner ds = new DeclScanner(env) {
|
||||
@Override
|
||||
void visitDecl(Tree tree, Name name) {
|
||||
TreePath p = getCurrentPath();
|
||||
DocCommentTree dc = env.trees.getDocCommentTree(p);
|
||||
|
||||
checker.scan(dc, p);
|
||||
}
|
||||
};
|
||||
|
||||
ds.scan(units, null);
|
||||
|
||||
reportStats(out);
|
||||
|
||||
Context ctx = ((JavacTaskImpl) task).getContext();
|
||||
JavaCompiler c = JavaCompiler.instance(ctx);
|
||||
c.printCount("error", c.errorCount());
|
||||
c.printCount("warn", c.warningCount());
|
||||
}
|
||||
|
||||
void processArgs(String... args) throws BadArgs {
|
||||
javacOpts = new ArrayList<>();
|
||||
javacFiles = new ArrayList<>();
|
||||
|
||||
if (args.length == 0)
|
||||
needHelp = true;
|
||||
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
String arg = args[i];
|
||||
if (arg.matches("-Xmax(errs|warns)") && i + 1 < args.length) {
|
||||
if (args[++i].matches("[0-9]+")) {
|
||||
javacOpts.add(arg);
|
||||
javacOpts.add(args[i]);
|
||||
} else {
|
||||
throw new BadArgs("dc.bad.value.for.option", arg, args[i]);
|
||||
}
|
||||
} else if ((arg.equals("-target") || arg.equals("-source")) && i + 1 < args.length) {
|
||||
javacOpts.add(arg);
|
||||
javacOpts.add(args[++i]);
|
||||
} else if (arg.equals(STATS)) {
|
||||
env.messages.setStatsEnabled(true);
|
||||
} else if (arg.equals("-bootclasspath") && i + 1 < args.length) {
|
||||
javacBootClassPath = splitPath(args[++i]);
|
||||
} else if (arg.equals("-classpath") && i + 1 < args.length) {
|
||||
javacClassPath = splitPath(args[++i]);
|
||||
} else if (arg.equals("-cp") && i + 1 < args.length) {
|
||||
javacClassPath = splitPath(args[++i]);
|
||||
} else if (arg.equals("-sourcepath") && i + 1 < args.length) {
|
||||
javacSourcePath = splitPath(args[++i]);
|
||||
} else if (arg.equals(XMSGS_OPTION)) {
|
||||
env.messages.setOptions(null);
|
||||
} else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) {
|
||||
env.messages.setOptions(arg.substring(arg.indexOf(":") + 1));
|
||||
} else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
|
||||
env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
|
||||
} else if (arg.startsWith(XHTML_VERSION_PREFIX)) {
|
||||
String argsVersion = arg.substring(arg.indexOf(":") + 1);
|
||||
HtmlVersion htmlVersion = HtmlVersion.getHtmlVersion(argsVersion);
|
||||
if (htmlVersion != null) {
|
||||
env.setHtmlVersion(htmlVersion);
|
||||
} else {
|
||||
throw new BadArgs("dc.bad.value.for.option", arg, argsVersion);
|
||||
}
|
||||
} else if (arg.equals("-h") || arg.equals("-help") || arg.equals("--help")
|
||||
|| arg.equals("-?") || arg.equals("-usage")) {
|
||||
needHelp = true;
|
||||
} else if (arg.startsWith("-")) {
|
||||
throw new BadArgs("dc.bad.option", arg);
|
||||
} else {
|
||||
while (i < args.length)
|
||||
javacFiles.add(new File(args[i++]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void showHelp(PrintWriter out) {
|
||||
String msg = localize("dc.main.usage");
|
||||
for (String line: msg.split("\n"))
|
||||
out.println(line);
|
||||
}
|
||||
|
||||
List<File> splitPath(String path) {
|
||||
List<File> files = new ArrayList<>();
|
||||
for (String f: path.split(File.pathSeparator)) {
|
||||
if (f.length() > 0)
|
||||
files.add(new File(f));
|
||||
}
|
||||
return files;
|
||||
}
|
||||
|
||||
List<File> javacBootClassPath;
|
||||
List<File> javacClassPath;
|
||||
List<File> javacSourcePath;
|
||||
List<String> javacOpts;
|
||||
List<File> javacFiles;
|
||||
boolean needHelp = false;
|
||||
|
||||
// </editor-fold>
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="javac Plugin">
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public String getName() {
|
||||
return "doclint";
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public void init(JavacTask task, String... args) {
|
||||
init(task, args, true);
|
||||
}
|
||||
|
||||
// </editor-fold>
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="Embedding API">
|
||||
|
||||
public void init(JavacTask task, String[] args, boolean addTaskListener) {
|
||||
env = new Env();
|
||||
for (String arg : args) {
|
||||
if (arg.equals(XMSGS_OPTION)) {
|
||||
env.messages.setOptions(null);
|
||||
} else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) {
|
||||
env.messages.setOptions(arg.substring(arg.indexOf(":") + 1));
|
||||
} else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
|
||||
env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
|
||||
} else if (arg.startsWith(XHTML_VERSION_PREFIX)) {
|
||||
String argsVersion = arg.substring(arg.indexOf(":") + 1);
|
||||
HtmlVersion htmlVersion = HtmlVersion.getHtmlVersion(argsVersion);
|
||||
if (htmlVersion != null) {
|
||||
env.setHtmlVersion(htmlVersion);
|
||||
} else {
|
||||
throw new IllegalArgumentException(argsVersion);
|
||||
}
|
||||
} else if (arg.startsWith(XCHECK_PACKAGE)) {
|
||||
env.setCheckPackages(arg.substring(arg.indexOf(":") + 1));
|
||||
} else
|
||||
throw new IllegalArgumentException(arg);
|
||||
}
|
||||
env.init(task);
|
||||
|
||||
checker = new Checker(env);
|
||||
|
||||
if (addTaskListener) {
|
||||
final DeclScanner ds = new DeclScanner(env) {
|
||||
@Override
|
||||
void visitDecl(Tree tree, Name name) {
|
||||
TreePath p = getCurrentPath();
|
||||
DocCommentTree dc = env.trees.getDocCommentTree(p);
|
||||
|
||||
checker.scan(dc, p);
|
||||
}
|
||||
};
|
||||
|
||||
TaskListener tl = new TaskListener() {
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public void started(TaskEvent e) {
|
||||
switch (e.getKind()) {
|
||||
case ANALYZE:
|
||||
CompilationUnitTree tree;
|
||||
while ((tree = todo.poll()) != null)
|
||||
ds.scan(tree, null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public void finished(TaskEvent e) {
|
||||
switch (e.getKind()) {
|
||||
case PARSE:
|
||||
todo.add(e.getCompilationUnit());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Queue<CompilationUnitTree> todo = new LinkedList<>();
|
||||
};
|
||||
|
||||
task.addTaskListener(tl);
|
||||
}
|
||||
}
|
||||
|
||||
public void scan(TreePath p) {
|
||||
DocCommentTree dc = env.trees.getDocCommentTree(p);
|
||||
checker.scan(dc, p);
|
||||
}
|
||||
|
||||
public boolean shouldCheck(CompilationUnitTree unit) {
|
||||
return env.shouldCheck(unit);
|
||||
}
|
||||
|
||||
public void reportStats(PrintWriter out) {
|
||||
env.messages.reportStats(out);
|
||||
}
|
||||
|
||||
// </editor-fold>
|
||||
|
||||
Env env;
|
||||
Checker checker;
|
||||
|
||||
public static boolean isValidOption(String opt) {
|
||||
if (opt.equals(XMSGS_OPTION))
|
||||
return true;
|
||||
if (opt.startsWith(XMSGS_CUSTOM_PREFIX))
|
||||
return Messages.Options.isValidOptions(opt.substring(XMSGS_CUSTOM_PREFIX.length()));
|
||||
if (opt.startsWith(XCHECK_PACKAGE)) {
|
||||
return Env.validatePackages(opt.substring(opt.indexOf(":") + 1));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private String localize(String code, Object... args) {
|
||||
Messages m = (env != null) ? env.messages : new Messages(null);
|
||||
return m.localize(code, args);
|
||||
}
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="DeclScanner">
|
||||
|
||||
static abstract class DeclScanner extends TreePathScanner<Void, Void> {
|
||||
final Env env;
|
||||
|
||||
public DeclScanner(Env env) {
|
||||
this.env = env;
|
||||
}
|
||||
|
||||
abstract void visitDecl(Tree tree, Name name);
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitPackage(PackageTree tree, Void ignore) {
|
||||
visitDecl(tree, null);
|
||||
return super.visitPackage(tree, ignore);
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitClass(ClassTree tree, Void ignore) {
|
||||
visitDecl(tree, tree.getSimpleName());
|
||||
return super.visitClass(tree, ignore);
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitMethod(MethodTree tree, Void ignore) {
|
||||
visitDecl(tree, tree.getName());
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitModule(ModuleTree tree, Void ignore) {
|
||||
visitDecl(tree, null);
|
||||
return super.visitModule(tree, ignore);
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitVariable(VariableTree tree, Void ignore) {
|
||||
visitDecl(tree, tree.getName());
|
||||
return super.visitVariable(tree, ignore);
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitCompilationUnit(CompilationUnitTree node, Void p) {
|
||||
if (!env.shouldCheck(node)) {
|
||||
return null;
|
||||
}
|
||||
return super.visitCompilationUnit(node, p);
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitBlock(BlockTree tree, Void ignore) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitLambdaExpression(LambdaExpressionTree tree, Void ignore) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// </editor-fold>
|
||||
|
||||
}
|
||||
|
|
|
@ -258,7 +258,7 @@ public class BasicJavacTask extends JavacTask {
|
|||
if (docLintOpts.isEmpty())
|
||||
return;
|
||||
|
||||
new DocLint().init(this, docLintOpts.toArray(new String[docLintOpts.size()]));
|
||||
DocLint.newDocLint().init(this, docLintOpts.toArray(new String[docLintOpts.size()]));
|
||||
JavaCompiler.instance(context).keepComments = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ public enum Option {
|
|||
XDOCLINT_CUSTOM("-Xdoclint:", "opt.Xdoclint.subopts", "opt.Xdoclint.custom", EXTENDED, BASIC) {
|
||||
@Override
|
||||
public boolean matches(String option) {
|
||||
return DocLint.isValidOption(
|
||||
return DocLint.newDocLint().isValidOption(
|
||||
option.replace(XDOCLINT_CUSTOM.primaryName, DocLint.XMSGS_CUSTOM_PREFIX));
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ public enum Option {
|
|||
XDOCLINT_PACKAGE("-Xdoclint/package:", "opt.Xdoclint.package.args", "opt.Xdoclint.package.desc", EXTENDED, BASIC) {
|
||||
@Override
|
||||
public boolean matches(String option) {
|
||||
return DocLint.isValidOption(
|
||||
return DocLint.newDocLint().isValidOption(
|
||||
option.replace(XDOCLINT_PACKAGE.primaryName, DocLint.XCHECK_PACKAGE));
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ import java.util.Collections;
|
|||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
import javax.tools.Diagnostic;
|
||||
|
@ -46,7 +47,6 @@ import com.sun.source.doctree.ReferenceTree;
|
|||
import com.sun.source.doctree.StartElementTree;
|
||||
import com.sun.source.doctree.TextTree;
|
||||
import com.sun.source.util.DocTreeFactory;
|
||||
import com.sun.tools.doclint.HtmlTag;
|
||||
import com.sun.tools.javac.api.JavacTrees;
|
||||
import com.sun.tools.javac.parser.ParserFactory;
|
||||
import com.sun.tools.javac.parser.ReferenceParser;
|
||||
|
@ -95,8 +95,8 @@ import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
|
|||
import com.sun.tools.javac.util.ListBuffer;
|
||||
import com.sun.tools.javac.util.Pair;
|
||||
import com.sun.tools.javac.util.Position;
|
||||
import com.sun.tools.javac.util.StringUtils;
|
||||
|
||||
import static com.sun.tools.doclint.HtmlTag.*;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -112,7 +112,7 @@ public class DocTreeMaker implements DocTreeFactory {
|
|||
|
||||
// A subset of block tags, which acts as sentence breakers, appearing
|
||||
// anywhere but the zero'th position in the first sentence.
|
||||
final EnumSet<HtmlTag> sentenceBreakTags;
|
||||
final Set<String> sentenceBreakTags;
|
||||
|
||||
/** Get the TreeMaker instance. */
|
||||
public static DocTreeMaker instance(Context context) {
|
||||
|
@ -142,7 +142,7 @@ public class DocTreeMaker implements DocTreeFactory {
|
|||
this.pos = Position.NOPOS;
|
||||
trees = JavacTrees.instance(context);
|
||||
referenceParser = new ReferenceParser(ParserFactory.instance(context));
|
||||
sentenceBreakTags = EnumSet.of(H1, H2, H3, H4, H5, H6, PRE, P);
|
||||
sentenceBreakTags = Set.of("H1", "H2", "H3", "H4", "H5", "H6", "PRE", "P");
|
||||
}
|
||||
|
||||
/** Reassign current position.
|
||||
|
@ -690,7 +690,7 @@ public class DocTreeMaker implements DocTreeFactory {
|
|||
}
|
||||
|
||||
private boolean isSentenceBreak(Name tagName) {
|
||||
return sentenceBreakTags.contains(get(tagName));
|
||||
return sentenceBreakTags.contains(StringUtils.toUpperCase(tagName.toString()));
|
||||
}
|
||||
|
||||
private boolean isSentenceBreak(DocTree dt, boolean isFirstDocTree) {
|
||||
|
|
|
@ -30,6 +30,7 @@ import java.net.URISyntaxException;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
@ -58,7 +59,6 @@ import com.sun.source.doctree.ThrowsTree;
|
|||
import com.sun.source.util.DocTreeScanner;
|
||||
import com.sun.source.util.DocTrees;
|
||||
import com.sun.source.util.JavacTask;
|
||||
import com.sun.tools.doclint.HtmlTag;
|
||||
import com.sun.tools.javac.util.DefinedBy;
|
||||
import com.sun.tools.javac.util.DefinedBy.Api;
|
||||
import com.sun.tools.javac.util.StringUtils;
|
||||
|
@ -124,6 +124,27 @@ public class JavadocFormatter {
|
|||
}
|
||||
}
|
||||
|
||||
enum HtmlTag {
|
||||
HTML,
|
||||
H1, H2, H3, H4, H5, H6,
|
||||
BLOCKQUOTE, P, PRE,
|
||||
IMG,
|
||||
OL, UL, LI,
|
||||
DL, DT, DD,
|
||||
TABLE, TR, TD, TH;
|
||||
|
||||
private static final Map<String, HtmlTag> index = new HashMap<>();
|
||||
static {
|
||||
for (HtmlTag t: values()) {
|
||||
index.put(StringUtils.toLowerCase(t.name()), t);
|
||||
}
|
||||
}
|
||||
|
||||
public static HtmlTag get(Name tagName) {
|
||||
return index.get(StringUtils.toLowerCase(tagName.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
private class FormatJavadocScanner extends DocTreeScanner<Object, Object> {
|
||||
private final StringBuilder result;
|
||||
private final JavacTask task;
|
||||
|
|
|
@ -117,6 +117,7 @@ module jdk.compiler {
|
|||
|
||||
uses javax.annotation.processing.Processor;
|
||||
uses com.sun.source.util.Plugin;
|
||||
uses com.sun.tools.doclint.DocLint;
|
||||
uses com.sun.tools.javac.platform.PlatformProvider;
|
||||
|
||||
provides java.util.spi.ToolProvider with
|
||||
|
|
|
@ -29,7 +29,6 @@ import com.sun.source.doctree.DocTree;
|
|||
import com.sun.source.doctree.EndElementTree;
|
||||
import com.sun.source.doctree.StartElementTree;
|
||||
import com.sun.source.util.DocTreeFactory;
|
||||
import com.sun.tools.doclint.HtmlTag;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.BodyContents;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
|
||||
|
@ -42,6 +41,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
|
|||
import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
|
||||
import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
|
||||
import jdk.javadoc.internal.doclets.toolkit.util.Utils;
|
||||
import jdk.javadoc.internal.doclint.HtmlTag;
|
||||
|
||||
import javax.lang.model.element.Element;
|
||||
import javax.lang.model.element.ModuleElement;
|
||||
|
|
|
@ -73,6 +73,8 @@ import com.sun.source.doctree.SummaryTree;
|
|||
import com.sun.source.doctree.SystemPropertyTree;
|
||||
import com.sun.source.doctree.TextTree;
|
||||
import com.sun.source.util.SimpleDocTreeVisitor;
|
||||
|
||||
import jdk.javadoc.internal.doclint.HtmlTag;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.Entity;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.FixedStringContent;
|
||||
|
@ -1262,9 +1264,9 @@ public class HtmlDocletWriter {
|
|||
}
|
||||
|
||||
if (name != null) {
|
||||
com.sun.tools.doclint.HtmlTag htmlTag = com.sun.tools.doclint.HtmlTag.get(name);
|
||||
HtmlTag htmlTag = HtmlTag.get(name);
|
||||
if (htmlTag != null &&
|
||||
htmlTag.blockType != com.sun.tools.doclint.HtmlTag.BlockType.INLINE) {
|
||||
htmlTag.blockType != jdk.javadoc.internal.doclint.HtmlTag.BlockType.INLINE) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1364,9 +1366,9 @@ public class HtmlDocletWriter {
|
|||
StartElementTree st = (StartElementTree)tag;
|
||||
Name name = st.getName();
|
||||
if (name != null) {
|
||||
com.sun.tools.doclint.HtmlTag htag =
|
||||
com.sun.tools.doclint.HtmlTag.get(name);
|
||||
return htag != null && htag.equals(com.sun.tools.doclint.HtmlTag.A);
|
||||
jdk.javadoc.internal.doclint.HtmlTag htag =
|
||||
jdk.javadoc.internal.doclint.HtmlTag.get(name);
|
||||
return htag != null && htag.equals(jdk.javadoc.internal.doclint.HtmlTag.A);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -411,7 +411,7 @@ public class HtmlOptions extends BaseOptions {
|
|||
messages.error("doclet.Option_doclint_no_qualifiers");
|
||||
return false;
|
||||
}
|
||||
if (!DocLint.isValidOption(dopt)) {
|
||||
if (!DocLint.newDocLint().isValidOption(dopt)) {
|
||||
messages.error("doclet.Option_doclint_invalid_arg");
|
||||
return false;
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ public class HtmlOptions extends BaseOptions {
|
|||
@Override
|
||||
public boolean process(String opt, List<String> args) {
|
||||
String dopt = opt.replace("-Xdoclint/package:", DocLint.XCHECK_PACKAGE);
|
||||
if (!DocLint.isValidOption(dopt)) {
|
||||
if (!DocLint.newDocLint().isValidOption(dopt)) {
|
||||
messages.error("doclet.Option_doclint_package_invalid_arg");
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ import javax.tools.JavaFileManager.Location;
|
|||
import com.sun.source.tree.CompilationUnitTree;
|
||||
import com.sun.source.util.JavacTask;
|
||||
import com.sun.source.util.TreePath;
|
||||
import com.sun.tools.doclint.DocLint;
|
||||
import com.sun.tools.javac.api.BasicJavacTask;
|
||||
import com.sun.tools.javac.code.Attribute;
|
||||
import com.sun.tools.javac.code.Flags;
|
||||
|
@ -70,6 +69,7 @@ import com.sun.tools.javac.model.JavacTypes;
|
|||
import com.sun.tools.javac.util.Names;
|
||||
|
||||
import jdk.javadoc.internal.doclets.toolkit.util.Utils;
|
||||
import jdk.javadoc.internal.doclint.DocLint;
|
||||
import jdk.javadoc.internal.tool.ToolEnvironment;
|
||||
import jdk.javadoc.internal.tool.DocEnvImpl;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.doclint;
|
||||
package jdk.javadoc.internal.doclint;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
|
@ -85,14 +85,13 @@ import com.sun.source.tree.Tree;
|
|||
import com.sun.source.util.DocTreePath;
|
||||
import com.sun.source.util.DocTreePathScanner;
|
||||
import com.sun.source.util.TreePath;
|
||||
import com.sun.tools.doclint.HtmlTag.AttrKind;
|
||||
import com.sun.tools.javac.tree.DocPretty;
|
||||
import com.sun.tools.javac.util.Assert;
|
||||
import com.sun.tools.javac.util.DefinedBy;
|
||||
import com.sun.tools.javac.util.DefinedBy.Api;
|
||||
import com.sun.tools.javac.util.StringUtils;
|
||||
|
||||
import static com.sun.tools.doclint.Messages.Group.*;
|
||||
import jdk.javadoc.internal.doclint.HtmlTag.AttrKind;
|
||||
import static jdk.javadoc.internal.doclint.Messages.Group.*;
|
||||
|
||||
|
||||
/**
|
|
@ -0,0 +1,446 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2020, 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
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.javadoc.internal.doclint;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
import javax.tools.StandardLocation;
|
||||
|
||||
import com.sun.source.doctree.DocCommentTree;
|
||||
import com.sun.source.tree.BlockTree;
|
||||
import com.sun.source.tree.ClassTree;
|
||||
import com.sun.source.tree.CompilationUnitTree;
|
||||
import com.sun.source.tree.LambdaExpressionTree;
|
||||
import com.sun.source.tree.ModuleTree;
|
||||
import com.sun.source.tree.PackageTree;
|
||||
import com.sun.source.tree.MethodTree;
|
||||
import com.sun.source.tree.Tree;
|
||||
import com.sun.source.tree.VariableTree;
|
||||
import com.sun.source.util.JavacTask;
|
||||
import com.sun.source.util.Plugin;
|
||||
import com.sun.source.util.TaskEvent;
|
||||
import com.sun.source.util.TaskListener;
|
||||
import com.sun.source.util.TreePath;
|
||||
import com.sun.source.util.TreePathScanner;
|
||||
import com.sun.tools.javac.api.JavacTaskImpl;
|
||||
import com.sun.tools.javac.api.JavacTool;
|
||||
import com.sun.tools.javac.file.JavacFileManager;
|
||||
import com.sun.tools.javac.main.JavaCompiler;
|
||||
import com.sun.tools.javac.util.Context;
|
||||
import com.sun.tools.javac.util.DefinedBy;
|
||||
import com.sun.tools.javac.util.DefinedBy.Api;
|
||||
|
||||
/**
|
||||
* Multi-function entry point for the doc check utility.
|
||||
*
|
||||
* This class can be invoked in the following ways:
|
||||
* <ul>
|
||||
* <li>From the command line
|
||||
* <li>From javac, as a plugin
|
||||
* <li>Directly, via a simple API
|
||||
* </ul>
|
||||
*
|
||||
* <p><b>This is NOT part of any supported API.
|
||||
* If you write code that depends on this, you do so at your own
|
||||
* risk. This code and its internal interfaces are subject to change
|
||||
* or deletion without notice.</b></p>
|
||||
*/
|
||||
public class DocLint extends com.sun.tools.doclint.DocLint {
|
||||
|
||||
public static final String XMSGS_OPTION = "-Xmsgs";
|
||||
public static final String XMSGS_CUSTOM_PREFIX = "-Xmsgs:";
|
||||
private static final String STATS = "-stats";
|
||||
public static final String XCUSTOM_TAGS_PREFIX = "-XcustomTags:";
|
||||
public static final String XHTML_VERSION_PREFIX = "-XhtmlVersion:";
|
||||
public static final String XCHECK_PACKAGE = "-XcheckPackage:";
|
||||
public static final String SEPARATOR = ",";
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="Command-line entry point">
|
||||
public static void main(String... args) {
|
||||
DocLint dl = new DocLint();
|
||||
try {
|
||||
dl.run(args);
|
||||
} catch (BadArgs e) {
|
||||
System.err.println(e.getMessage());
|
||||
System.exit(1);
|
||||
} catch (IOException e) {
|
||||
System.err.println(dl.localize("dc.main.ioerror", e.getLocalizedMessage()));
|
||||
System.exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
// </editor-fold>
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="Simple API">
|
||||
|
||||
public class BadArgs extends Exception {
|
||||
private static final long serialVersionUID = 0;
|
||||
BadArgs(String code, Object... args) {
|
||||
super(localize(code, args));
|
||||
this.code = code;
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
final String code;
|
||||
final transient Object[] args;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple API entry point.
|
||||
* @param args Options and operands for doclint
|
||||
* @throws BadArgs if an error is detected in any args
|
||||
* @throws IOException if there are problems with any of the file arguments
|
||||
*/
|
||||
public void run(String... args) throws BadArgs, IOException {
|
||||
PrintWriter out = new PrintWriter(System.out);
|
||||
try {
|
||||
run(out, args);
|
||||
} finally {
|
||||
out.flush();
|
||||
}
|
||||
}
|
||||
|
||||
public void run(PrintWriter out, String... args) throws BadArgs, IOException {
|
||||
env = new Env();
|
||||
processArgs(args);
|
||||
|
||||
boolean noFiles = javacFiles.isEmpty();
|
||||
if (needHelp) {
|
||||
showHelp(out);
|
||||
if (noFiles)
|
||||
return;
|
||||
} else if (noFiles) {
|
||||
out.println(localize("dc.main.no.files.given"));
|
||||
return;
|
||||
}
|
||||
|
||||
JavacTool tool = JavacTool.create();
|
||||
|
||||
JavacFileManager fm = new JavacFileManager(new Context(), false, null);
|
||||
fm.setSymbolFileEnabled(false);
|
||||
if (javacBootClassPath != null) {
|
||||
fm.setLocation(StandardLocation.PLATFORM_CLASS_PATH, javacBootClassPath);
|
||||
}
|
||||
if (javacClassPath != null) {
|
||||
fm.setLocation(StandardLocation.CLASS_PATH, javacClassPath);
|
||||
}
|
||||
if (javacSourcePath != null) {
|
||||
fm.setLocation(StandardLocation.SOURCE_PATH, javacSourcePath);
|
||||
}
|
||||
|
||||
JavacTask task = tool.getTask(out, fm, null, javacOpts, null,
|
||||
fm.getJavaFileObjectsFromFiles(javacFiles));
|
||||
Iterable<? extends CompilationUnitTree> units = task.parse();
|
||||
((JavacTaskImpl) task).enter();
|
||||
|
||||
env.init(task);
|
||||
checker = new Checker(env);
|
||||
|
||||
DeclScanner ds = new DeclScanner(env) {
|
||||
@Override
|
||||
void visitDecl(Tree tree, Name name) {
|
||||
TreePath p = getCurrentPath();
|
||||
DocCommentTree dc = env.trees.getDocCommentTree(p);
|
||||
|
||||
checker.scan(dc, p);
|
||||
}
|
||||
};
|
||||
|
||||
ds.scan(units, null);
|
||||
|
||||
reportStats(out);
|
||||
|
||||
Context ctx = ((JavacTaskImpl) task).getContext();
|
||||
JavaCompiler c = JavaCompiler.instance(ctx);
|
||||
c.printCount("error", c.errorCount());
|
||||
c.printCount("warn", c.warningCount());
|
||||
}
|
||||
|
||||
void processArgs(String... args) throws BadArgs {
|
||||
javacOpts = new ArrayList<>();
|
||||
javacFiles = new ArrayList<>();
|
||||
|
||||
if (args.length == 0)
|
||||
needHelp = true;
|
||||
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
String arg = args[i];
|
||||
if (arg.matches("-Xmax(errs|warns)") && i + 1 < args.length) {
|
||||
if (args[++i].matches("[0-9]+")) {
|
||||
javacOpts.add(arg);
|
||||
javacOpts.add(args[i]);
|
||||
} else {
|
||||
throw new BadArgs("dc.bad.value.for.option", arg, args[i]);
|
||||
}
|
||||
} else if ((arg.equals("-target") || arg.equals("-source")) && i + 1 < args.length) {
|
||||
javacOpts.add(arg);
|
||||
javacOpts.add(args[++i]);
|
||||
} else if (arg.equals(STATS)) {
|
||||
env.messages.setStatsEnabled(true);
|
||||
} else if (arg.equals("-bootclasspath") && i + 1 < args.length) {
|
||||
javacBootClassPath = splitPath(args[++i]);
|
||||
} else if (arg.equals("-classpath") && i + 1 < args.length) {
|
||||
javacClassPath = splitPath(args[++i]);
|
||||
} else if (arg.equals("-cp") && i + 1 < args.length) {
|
||||
javacClassPath = splitPath(args[++i]);
|
||||
} else if (arg.equals("-sourcepath") && i + 1 < args.length) {
|
||||
javacSourcePath = splitPath(args[++i]);
|
||||
} else if (arg.equals(XMSGS_OPTION)) {
|
||||
env.messages.setOptions(null);
|
||||
} else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) {
|
||||
env.messages.setOptions(arg.substring(arg.indexOf(":") + 1));
|
||||
} else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
|
||||
env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
|
||||
} else if (arg.startsWith(XHTML_VERSION_PREFIX)) {
|
||||
String argsVersion = arg.substring(arg.indexOf(":") + 1);
|
||||
HtmlVersion htmlVersion = HtmlVersion.getHtmlVersion(argsVersion);
|
||||
if (htmlVersion != null) {
|
||||
env.setHtmlVersion(htmlVersion);
|
||||
} else {
|
||||
throw new BadArgs("dc.bad.value.for.option", arg, argsVersion);
|
||||
}
|
||||
} else if (arg.equals("-h") || arg.equals("-help") || arg.equals("--help")
|
||||
|| arg.equals("-?") || arg.equals("-usage")) {
|
||||
needHelp = true;
|
||||
} else if (arg.startsWith("-")) {
|
||||
throw new BadArgs("dc.bad.option", arg);
|
||||
} else {
|
||||
while (i < args.length)
|
||||
javacFiles.add(new File(args[i++]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void showHelp(PrintWriter out) {
|
||||
String msg = localize("dc.main.usage");
|
||||
for (String line: msg.split("\n"))
|
||||
out.println(line);
|
||||
}
|
||||
|
||||
List<File> splitPath(String path) {
|
||||
List<File> files = new ArrayList<>();
|
||||
for (String f: path.split(File.pathSeparator)) {
|
||||
if (f.length() > 0)
|
||||
files.add(new File(f));
|
||||
}
|
||||
return files;
|
||||
}
|
||||
|
||||
List<File> javacBootClassPath;
|
||||
List<File> javacClassPath;
|
||||
List<File> javacSourcePath;
|
||||
List<String> javacOpts;
|
||||
List<File> javacFiles;
|
||||
boolean needHelp = false;
|
||||
|
||||
// </editor-fold>
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="javac Plugin">
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public String getName() {
|
||||
return "doclint";
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public void init(JavacTask task, String... args) {
|
||||
init(task, args, true);
|
||||
}
|
||||
|
||||
// </editor-fold>
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="Embedding API">
|
||||
|
||||
public void init(JavacTask task, String[] args, boolean addTaskListener) {
|
||||
env = new Env();
|
||||
for (String arg : args) {
|
||||
if (arg.equals(XMSGS_OPTION)) {
|
||||
env.messages.setOptions(null);
|
||||
} else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) {
|
||||
env.messages.setOptions(arg.substring(arg.indexOf(":") + 1));
|
||||
} else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
|
||||
env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
|
||||
} else if (arg.startsWith(XHTML_VERSION_PREFIX)) {
|
||||
String argsVersion = arg.substring(arg.indexOf(":") + 1);
|
||||
HtmlVersion htmlVersion = HtmlVersion.getHtmlVersion(argsVersion);
|
||||
if (htmlVersion != null) {
|
||||
env.setHtmlVersion(htmlVersion);
|
||||
} else {
|
||||
throw new IllegalArgumentException(argsVersion);
|
||||
}
|
||||
} else if (arg.startsWith(XCHECK_PACKAGE)) {
|
||||
env.setCheckPackages(arg.substring(arg.indexOf(":") + 1));
|
||||
} else
|
||||
throw new IllegalArgumentException(arg);
|
||||
}
|
||||
env.init(task);
|
||||
|
||||
checker = new Checker(env);
|
||||
|
||||
if (addTaskListener) {
|
||||
final DeclScanner ds = new DeclScanner(env) {
|
||||
@Override
|
||||
void visitDecl(Tree tree, Name name) {
|
||||
TreePath p = getCurrentPath();
|
||||
DocCommentTree dc = env.trees.getDocCommentTree(p);
|
||||
|
||||
checker.scan(dc, p);
|
||||
}
|
||||
};
|
||||
|
||||
TaskListener tl = new TaskListener() {
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public void started(TaskEvent e) {
|
||||
switch (e.getKind()) {
|
||||
case ANALYZE:
|
||||
CompilationUnitTree tree;
|
||||
while ((tree = todo.poll()) != null)
|
||||
ds.scan(tree, null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public void finished(TaskEvent e) {
|
||||
switch (e.getKind()) {
|
||||
case PARSE:
|
||||
todo.add(e.getCompilationUnit());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Queue<CompilationUnitTree> todo = new LinkedList<>();
|
||||
};
|
||||
|
||||
task.addTaskListener(tl);
|
||||
}
|
||||
}
|
||||
|
||||
public void scan(TreePath p) {
|
||||
DocCommentTree dc = env.trees.getDocCommentTree(p);
|
||||
checker.scan(dc, p);
|
||||
}
|
||||
|
||||
public boolean shouldCheck(CompilationUnitTree unit) {
|
||||
return env.shouldCheck(unit);
|
||||
}
|
||||
|
||||
public void reportStats(PrintWriter out) {
|
||||
env.messages.reportStats(out);
|
||||
}
|
||||
|
||||
// </editor-fold>
|
||||
|
||||
Env env;
|
||||
Checker checker;
|
||||
|
||||
public boolean isValidOption(String opt) {
|
||||
if (opt.equals(XMSGS_OPTION))
|
||||
return true;
|
||||
if (opt.startsWith(XMSGS_CUSTOM_PREFIX))
|
||||
return Messages.Options.isValidOptions(opt.substring(XMSGS_CUSTOM_PREFIX.length()));
|
||||
if (opt.startsWith(XCHECK_PACKAGE)) {
|
||||
return Env.validatePackages(opt.substring(opt.indexOf(":") + 1));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private String localize(String code, Object... args) {
|
||||
Messages m = (env != null) ? env.messages : new Messages(null);
|
||||
return m.localize(code, args);
|
||||
}
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="DeclScanner">
|
||||
|
||||
static abstract class DeclScanner extends TreePathScanner<Void, Void> {
|
||||
final Env env;
|
||||
|
||||
public DeclScanner(Env env) {
|
||||
this.env = env;
|
||||
}
|
||||
|
||||
abstract void visitDecl(Tree tree, Name name);
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitPackage(PackageTree tree, Void ignore) {
|
||||
visitDecl(tree, null);
|
||||
return super.visitPackage(tree, ignore);
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitClass(ClassTree tree, Void ignore) {
|
||||
visitDecl(tree, tree.getSimpleName());
|
||||
return super.visitClass(tree, ignore);
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitMethod(MethodTree tree, Void ignore) {
|
||||
visitDecl(tree, tree.getName());
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitModule(ModuleTree tree, Void ignore) {
|
||||
visitDecl(tree, null);
|
||||
return super.visitModule(tree, ignore);
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitVariable(VariableTree tree, Void ignore) {
|
||||
visitDecl(tree, tree.getName());
|
||||
return super.visitVariable(tree, ignore);
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitCompilationUnit(CompilationUnitTree node, Void p) {
|
||||
if (!env.shouldCheck(node)) {
|
||||
return null;
|
||||
}
|
||||
return super.visitCompilationUnit(node, p);
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitBlock(BlockTree tree, Void ignore) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override @DefinedBy(Api.COMPILER_TREE)
|
||||
public Void visitLambdaExpression(LambdaExpressionTree tree, Void ignore) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// </editor-fold>
|
||||
|
||||
}
|
|
@ -23,7 +23,7 @@
|
|||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.doclint;
|
||||
package jdk.javadoc.internal.doclint;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
|
@ -23,7 +23,7 @@
|
|||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.doclint;
|
||||
package jdk.javadoc.internal.doclint;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
|
@ -35,7 +35,7 @@ import javax.lang.model.element.Name;
|
|||
|
||||
import com.sun.tools.javac.util.StringUtils;
|
||||
|
||||
import static com.sun.tools.doclint.HtmlTag.Attr.*;
|
||||
import static jdk.javadoc.internal.doclint.HtmlTag.Attr.*;
|
||||
|
||||
/**
|
||||
* Enum representing HTML tags.
|
|
@ -23,7 +23,7 @@
|
|||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.doclint;
|
||||
package jdk.javadoc.internal.doclint;
|
||||
|
||||
/**
|
||||
* Enum representing HTML version of the documentation comment.
|
|
@ -23,7 +23,7 @@
|
|||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.doclint;
|
||||
package jdk.javadoc.internal.doclint;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.text.MessageFormat;
|
||||
|
@ -41,8 +41,8 @@ import javax.tools.Diagnostic;
|
|||
|
||||
import com.sun.source.doctree.DocTree;
|
||||
import com.sun.source.tree.Tree;
|
||||
import com.sun.tools.doclint.Env.AccessKind;
|
||||
import com.sun.tools.javac.util.StringUtils;
|
||||
import jdk.javadoc.internal.doclint.Env.AccessKind;
|
||||
|
||||
/**
|
||||
* Message reporting for DocLint.
|
|
@ -70,4 +70,7 @@ module jdk.javadoc {
|
|||
|
||||
provides javax.tools.Tool with
|
||||
jdk.javadoc.internal.api.JavadocTool;
|
||||
|
||||
provides com.sun.tools.doclint.DocLint with
|
||||
jdk.javadoc.internal.doclint.DocLint;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @bug 8236949 8238259
|
||||
* @summary javadoc -Xdoclint does not accumulate options correctly
|
||||
* @library /tools/lib ../../lib
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* jdk.javadoc/jdk.javadoc.internal.tool
|
||||
* @build toolbox.ToolBox javadoc.tester.*
|
||||
* @run main TestDocLintOption
|
||||
|
@ -40,8 +40,8 @@ import java.util.Set;
|
|||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import com.sun.tools.doclint.Messages.Group;
|
||||
import static com.sun.tools.doclint.Messages.Group.*;
|
||||
import jdk.javadoc.internal.doclint.Messages.Group;
|
||||
import static jdk.javadoc.internal.doclint.Messages.Group.*;
|
||||
|
||||
import javadoc.tester.JavadocTester;
|
||||
import toolbox.ToolBox;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref AccessTest.protected.out AccessTest.java
|
||||
* @run main DocLintTester -Xmsgs -ref AccessTest.private.out AccessTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-accessibility AccessibilityTest.java
|
||||
* @run main DocLintTester -ref AccessibilityTest.out AccessibilityTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8247955
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -XhtmlVersion:html5 -Xmsgs:-accessibility AccessibilityTest5.java
|
||||
* @run main DocLintTester -XhtmlVersion:html5 -ref AccessibilityTest5.out AccessibilityTest5.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref AnchorTest.out AnchorTest.java
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8020313
|
||||
* @summary doclint doesn't reset HTML anchors correctly
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref AnchorTest2.out AnchorTest2.java AnchorTest2a.java
|
||||
* @run main DocLintTester -ref AnchorTest2.out AnchorTest2a.java AnchorTest2.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8020278
|
||||
* @summary NPE in javadoc (bad handling of bad tag in package-info.java)
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref BadPackageCommentTest.out BadPackageCommentTest.java
|
||||
*/
|
||||
|
|
|
@ -25,14 +25,15 @@
|
|||
* @test
|
||||
* @bug 8006263
|
||||
* @summary Supplementary test cases needed for doclint
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
*/
|
||||
|
||||
import com.sun.tools.doclint.Checker;
|
||||
import com.sun.tools.doclint.HtmlTag;
|
||||
import com.sun.tools.doclint.Messages;
|
||||
import java.util.Objects;
|
||||
|
||||
import jdk.javadoc.internal.doclint.Checker;
|
||||
import jdk.javadoc.internal.doclint.HtmlTag;
|
||||
import jdk.javadoc.internal.doclint.Messages;
|
||||
|
||||
public class CoverageExtras {
|
||||
public static void main(String... args) {
|
||||
new CoverageExtras().run();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8006248 8028318
|
||||
* @summary DocLint should report unknown tags
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester CustomTagTest.java
|
||||
* @run main DocLintTester -XcustomTags: -ref CustomTagTest.out CustomTagTest.java
|
||||
|
|
|
@ -33,8 +33,8 @@ import java.util.List;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.sun.tools.doclint.DocLint;
|
||||
import com.sun.tools.doclint.DocLint.BadArgs;
|
||||
import jdk.javadoc.internal.doclint.DocLint;
|
||||
import jdk.javadoc.internal.doclint.DocLint.BadArgs;
|
||||
|
||||
public class DocLintTester {
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8081820
|
||||
* @summary Validate parameter names uniqueness
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-reference DuplicateParamTest.java
|
||||
* @run main DocLintTester -ref DuplicateParamTest.out DuplicateParamTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8081820
|
||||
* @summary Validate return uniqueness
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-reference DuplicateReturnTest.java
|
||||
* @run main DocLintTester -ref DuplicateReturnTest.out DuplicateReturnTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptyAuthorTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptyAuthorTest.out EmptyAuthorTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptyExceptionTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptyExceptionTest.out EmptyExceptionTest.java
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @test
|
||||
* @bug 8246712
|
||||
* @summary doclint incorrectly reports some HTML elements as empty
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @library /tools/lib
|
||||
* @build toolbox.TestRunner toolbox.ToolBox
|
||||
* @run main EmptyHtmlTest
|
||||
|
@ -41,7 +41,7 @@ import java.util.List;
|
|||
|
||||
import com.sun.source.doctree.DocTreeVisitor;
|
||||
import com.sun.source.doctree.InlineTagTree;
|
||||
import com.sun.tools.doclint.DocLint;
|
||||
import jdk.javadoc.internal.doclint.DocLint;
|
||||
import toolbox.TestRunner;
|
||||
import toolbox.ToolBox;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptyParamTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptyParamTest.out EmptyParamTest.java
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* @test
|
||||
* @bug 8010317
|
||||
* @summary DocLint incorrectly reports some <pre> tags as empty
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:html EmptyPreTest.java
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptyReturnTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptyReturnTest.out EmptyReturnTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptySerialDataTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptySerialDataTest.out EmptySerialDataTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptySerialFieldTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptySerialFieldTest.out EmptySerialFieldTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptySinceTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptySinceTest.out EmptySinceTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptyVersionTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptyVersionTest.out EmptyVersionTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8006236
|
||||
* @summary doclint: structural issue hidden
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-html EndTagsTest.java
|
||||
* @run main DocLintTester -ref EndTagsTest.out EndTagsTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8007096
|
||||
* @summary DocLint parsing problems with some comments
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-html EndWithIdentifierTest.java
|
||||
* @run main DocLintTester -Xmsgs -ref EndWithIdentifierTest.out EndWithIdentifierTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-html HtmlAttrsTest.java
|
||||
* @run main DocLintTester -ref HtmlAttrsTest.out HtmlAttrsTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-html HtmlTagsTest.java
|
||||
* @run main DocLintTester -ref HtmlTagsTest.out HtmlTagsTest.java
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @bug 8072945
|
||||
* @summary test HTML version
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -XhtmlVersion:html5 HtmlVersionTest.java
|
||||
* @run main DocLintTester -XhtmlVersion:html4 HtmlVersionTest.java
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* @test
|
||||
* @bug 8194069
|
||||
* @summary ignore declarations in lambda expressions
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:all SyntheticTest.java
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8006228
|
||||
* @summary Doclint doesn't detect <code> {@code nested inline} </code>
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref LiteralTest.out LiteralTest.java
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-missing MissingCommentTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref MissingCommentTest.out MissingCommentTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-missing MissingParamsTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref MissingParamsTest.out MissingParamsTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-missing MissingReturnTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref MissingReturnTest.out MissingReturnTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-missing MissingThrowsTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref MissingThrowsTest.out MissingThrowsTest.java
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
* @test
|
||||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
*/
|
||||
|
||||
import com.sun.tools.doclint.DocLint;
|
||||
import jdk.javadoc.internal.doclint.DocLint;
|
||||
|
||||
public class OptionTest {
|
||||
public static void main(String... args) throws Exception {
|
||||
|
@ -80,9 +80,10 @@ public class OptionTest {
|
|||
}
|
||||
|
||||
void test(String[] tests, boolean expect) {
|
||||
DocLint docLint = new DocLint();
|
||||
for (String test: tests) {
|
||||
System.err.println("test: " + test);
|
||||
boolean found = DocLint.isValidOption(test);
|
||||
boolean found = docLint.isValidOption(test);
|
||||
if (found != expect)
|
||||
error("Unexpected result: " + found + ",expected: " + expect);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* @test
|
||||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:all OverridesTest.java
|
||||
*/
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* @test
|
||||
* @bug 8007566
|
||||
* @summary DocLint too aggressive with not allowed here: <p>
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs ParaTagTest.java
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8160196
|
||||
* @summary Module summary page should display information based on "api" or "detail" mode.
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref ProvidesTest.out ProvidesTest.java
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832 8020556 8002154 8200432 8177280
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-reference ReferenceTest.java
|
||||
* @run main DocLintTester -ref ReferenceTest.out ReferenceTest.java
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* @test
|
||||
* @bug 8006615
|
||||
* @summary move remaining messages into resource bundle
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -35,7 +35,7 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.sun.tools.doclint.DocLint;
|
||||
import jdk.javadoc.internal.doclint.DocLint;
|
||||
|
||||
public class ResourceTest {
|
||||
public static void main(String... args) throws Exception {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* @bug 8004832 8000103
|
||||
* @summary Add new doclint package
|
||||
* @summary Create doclint utility
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
|
@ -38,8 +38,8 @@ import java.lang.annotation.RetentionPolicy;
|
|||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import com.sun.tools.doclint.DocLint;
|
||||
import com.sun.tools.doclint.DocLint.BadArgs;
|
||||
import jdk.javadoc.internal.doclint.DocLint;
|
||||
import jdk.javadoc.internal.doclint.DocLint.BadArgs;
|
||||
|
||||
/** javadoc error on toplevel: a & b. */
|
||||
public class RunTest {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref SummaryTest.out SummaryTest.java
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-syntax SyntaxTest.java
|
||||
* @run main DocLintTester -ref SyntaxTest.out SyntaxTest.java
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* @test
|
||||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:all SyntheticTest.java
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8007096
|
||||
* @summary DocLint parsing problems with some comments
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-html UnfinishedInlineTagTest.java
|
||||
* @run main DocLintTester -Xmsgs -ref UnfinishedInlineTagTest.out UnfinishedInlineTagTest.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8160196
|
||||
* @summary Module summary page should display information based on "api" or "detail" mode.
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref UsesTest.out UsesTest.java
|
||||
*/
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* @test
|
||||
* @bug 8004832 8048806
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester ValidTest.java
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @test /nodynamiccopyright/
|
||||
* @bug 8025272
|
||||
* @summary doclint needs to check for valid usage of at-value tag
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref ValueTest.out ValueTest.java
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @bug 8025246
|
||||
* @summary doclint is showing error on anchor already defined when it's not
|
||||
* @library ../..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref Test.out Test.java
|
||||
* @compile/fail/ref=Test.javac.out -XDrawDiagnostics -Werror -Xdoclint:all Test.java
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @bug 8025246
|
||||
* @summary doclint is showing error on anchor already defined when it's not
|
||||
* @library ../..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref package-info.out package-info.java
|
||||
* @compile/fail/ref=package-info.javac.out -XDrawDiagnostics -Werror -Xdoclint:all package-info.java
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @bug 8006251
|
||||
* @summary test block tags
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-accessibility BlockTagsTest.java
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @bug 8006263
|
||||
* @summary Supplementary test cases needed for doclint
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-html EntitiesTest.java
|
||||
* @run main DocLintTester -Xmsgs:html -ref EntitiesTest.out EntitiesTest.java
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8072945
|
||||
* @summary test tags and attributes specific to the output HTML version
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -XhtmlVersion:html5 -ref HtmlVersionTagsAttrsTestHtml5.out HtmlVersionTagsAttrsTest.java
|
||||
* @run main DocLintTester -XhtmlVersion:html4 -ref HtmlVersionTagsAttrsTestHtml4.out HtmlVersionTagsAttrsTest.java
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @bug 8006251
|
||||
* @summary test inline tags
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs InlineTagsTest.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8006251 8013405 8022173
|
||||
* @summary test list tags
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs -ref ListTagsTest.out ListTagsTest.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8006251 8022173
|
||||
* @summary test other tags
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs -ref OtherTagsTest.out OtherTagsTest.java
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @bug 8006251 8022173
|
||||
* @summary test table tags
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs TableTagsTest.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref TagNotAllowed.out TagNotAllowed.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref TextNotAllowed.out TextNotAllowed.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8162576
|
||||
* @summary Missing doclint check missing for modules
|
||||
* @library ../..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref module-info.out module-info.java
|
||||
* @compile/fail/ref=module-info.javac.out -XDrawDiagnostics -Werror -Xlint:-options -Xdoclint:all module-info.java
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @bug 8162576
|
||||
* @summary Missing doclint check missing for modules
|
||||
* @library ../..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester module-info.java
|
||||
* @compile -Xdoclint:all -Werror -Xlint:-options module-info.java
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8020664 8021215
|
||||
* @summary doclint gives incorrect warnings on normal package statements
|
||||
* @library ../..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref Test.out Test.java
|
||||
* @compile/fail/ref=Test.javac.out -XDrawDiagnostics -Werror -Xdoclint:all Test.java
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8020664 8021215
|
||||
* @summary doclint gives incorrect warnings on normal package statements
|
||||
* @library ../..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref package-info.out package-info.java
|
||||
* @compile/fail/ref=package-info.javac.out -XDrawDiagnostics -Werror -Xdoclint:all package-info.java
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @bug 8020664 8021215
|
||||
* @summary doclint gives incorrect warnings on normal package statements
|
||||
* @library ../..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester Test.java
|
||||
* @compile -Xdoclint:all Test.java
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @bug 8020664 8021215
|
||||
* @summary doclint gives incorrect warnings on normal package statements
|
||||
* @library ../..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester package-info.java
|
||||
* @compile -Xdoclint:all package-info.java
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref AnchorAlreadyDefined.out AnchorAlreadyDefined.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref BadEnd.out BadEnd.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref InsertImplicit.out InsertImplicit.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref InvalidEntity.out InvalidEntity.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref InvalidName.out InvalidName.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref InvalidTag.out InvalidTag.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref InvalidURI.out InvalidURI.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref MissingGT.out MissingGT.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref MissingTag.out MissingTag.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref NestedTag.out NestedTag.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref ParaInPre.out ParaInPre.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref RepeatedAttr.out RepeatedAttr.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref TextNotAllowed.out TextNotAllowed.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832 8026368
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref TrimmingEmptyTag.out TrimmingEmptyTag.java
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @bug 8004832
|
||||
* @summary Add new doclint package
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref UnescapedOrUnknownEntity.out UnescapedOrUnknownEntity.java
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @bug 8006263
|
||||
* @summary Supplementary test cases needed for doclint
|
||||
* @library ..
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -ref HelpTest.out
|
||||
* @run main DocLintTester -ref HelpTest.out -h
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue