mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8020278: NPE in javadoc
Reviewed-by: mcimadamore, vromero
This commit is contained in:
parent
617386d568
commit
9dd2fe90d4
4 changed files with 32 additions and 1 deletions
|
@ -327,6 +327,14 @@ public class DocLint implements Plugin {
|
|||
static abstract class DeclScanner extends TreePathScanner<Void, Void> {
|
||||
abstract void visitDecl(Tree tree, Name name);
|
||||
|
||||
@Override
|
||||
public Void visitCompilationUnit(CompilationUnitTree tree, Void ignore) {
|
||||
if (tree.getPackageName() != null) {
|
||||
visitDecl(tree, null);
|
||||
}
|
||||
return super.visitCompilationUnit(tree, ignore);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitClass(ClassTree tree, Void ignore) {
|
||||
visitDecl(tree, tree.getSimpleName());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue