Skip to content

Commit

Permalink
Only check for package javadoc in package-info.java sources.
Browse files Browse the repository at this point in the history
	Change on 2016/12/23 by tball <tball@google.com>

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142853444
  • Loading branch information
tomball committed Dec 28, 2016
1 parent 9edf13d commit 30ad89a
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -1006,8 +1006,10 @@ private PackageDeclaration convertPackage(JCTree.JCExpression node, PackageEleme
for (JCTree.JCAnnotation pkgAnnotation : unit.getPackageAnnotations()) {
newNode.addAnnotation((Annotation) convert(pkgAnnotation));
}
if (unit.sourcefile.toUri().getPath().endsWith("package-info.java")) {
newNode.setJavadoc((Javadoc) getAssociatedJavaDoc(unit, pkg));
}
return (PackageDeclaration) newNode.setName(convertName((PackageSymbol) pkg, getPosition(node)))
.setJavadoc((Javadoc) getAssociatedJavaDoc(unit, pkg))
.setPosition(SourcePosition.NO_POSITION);
}

Expand Down

0 comments on commit 30ad89a

Please sign in to comment.