diagnose EA-37540 - CCE: JavaDocInfoGenerator.getDocComment

This commit is contained in:
peter
2012-07-18 20:18:56 +02:00
parent 714c00de8f
commit db15967956
@@ -382,7 +382,11 @@ public class JavaDocInfoGenerator {
@Nullable
private static PsiDocComment getDocComment(final PsiDocCommentOwner docOwner) {
PsiDocComment comment = ((PsiDocCommentOwner)docOwner.getNavigationElement()).getDocComment();
PsiElement navElement = docOwner.getNavigationElement();
if (!(navElement instanceof PsiDocCommentOwner)) {
throw new AssertionError("Wrong navElement: " + navElement + "; original = " + docOwner + " of class " + docOwner.getClass());
}
PsiDocComment comment = ((PsiDocCommentOwner)navElement).getDocComment();
if (comment == null) { //check for non-normalized fields
final PsiModifierList modifierList = docOwner.getModifierList();
if (modifierList != null) {