mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix tests
This commit is contained in:
@@ -364,14 +364,6 @@ public class JavaDocUtil {
|
||||
}
|
||||
|
||||
public static boolean isInsidePackageInfo(@Nullable PsiDocComment containingComment) {
|
||||
if (containingComment == null || containingComment.getOwner() != null) {
|
||||
return false;
|
||||
}
|
||||
final PsiElement parent = containingComment.getParent();
|
||||
if (!(parent instanceof PsiJavaFile)) {
|
||||
return false;
|
||||
}
|
||||
final PsiJavaFile file = (PsiJavaFile)parent;
|
||||
return "package-info.java".equals(file.getName());
|
||||
return containingComment != null && containingComment.getOwner() == null && containingComment.getParent() instanceof PsiJavaFile;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -133,7 +133,8 @@ public class DanglingJavadocInspection extends BaseInspection {
|
||||
return;
|
||||
}
|
||||
if (JavaDocUtil.isInsidePackageInfo(comment) &&
|
||||
PsiTreeUtil.skipSiblingsForward(comment, PsiWhiteSpace.class) instanceof PsiPackageStatement) {
|
||||
PsiTreeUtil.skipSiblingsForward(comment, PsiWhiteSpace.class) instanceof PsiPackageStatement &&
|
||||
"package-info.java".equals(comment.getContainingFile().getName())) {
|
||||
return;
|
||||
}
|
||||
registerError(comment.getFirstChild());
|
||||
|
||||
Reference in New Issue
Block a user