mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't infer contract/nullity for magic constant inspection
This commit is contained in:
+3
-3
@@ -415,9 +415,9 @@ public class MagicConstantInspection extends BaseJavaLocalInspectionTool {
|
||||
|
||||
@NotNull
|
||||
private static PsiAnnotation[] getAllAnnotations(@NotNull PsiModifierListOwner element) {
|
||||
return CachedValuesManager.getCachedValue(element,
|
||||
() -> CachedValueProvider.Result.create(AnnotationUtil.getAllAnnotations(element, true, null),
|
||||
PsiModificationTracker.MODIFICATION_COUNT));
|
||||
return CachedValuesManager.getCachedValue(element, () ->
|
||||
CachedValueProvider.Result.create(AnnotationUtil.getAllAnnotations(element, true, null, false),
|
||||
PsiModificationTracker.MODIFICATION_COUNT));
|
||||
}
|
||||
|
||||
private static AllowedValues parseBeanInfo(@NotNull PsiModifierListOwner owner, @NotNull PsiManager manager) {
|
||||
|
||||
@@ -468,7 +468,7 @@ public class AnnotationUtil {
|
||||
if (owner instanceof PsiClass) {
|
||||
for (PsiClass superClass : ((PsiClass)owner).getSupers()) {
|
||||
if (visited == null) visited = new THashSet<PsiModifierListOwner>();
|
||||
if (visited.add(superClass)) annotations = ArrayUtil.mergeArrays(annotations, getAllAnnotations(superClass, true, visited));
|
||||
if (visited.add(superClass)) annotations = ArrayUtil.mergeArrays(annotations, getAllAnnotations(superClass, true, visited, withInferred));
|
||||
}
|
||||
}
|
||||
else if (owner instanceof PsiMethod) {
|
||||
@@ -484,7 +484,7 @@ public class AnnotationUtil {
|
||||
if (visited == null) visited = new THashSet<PsiModifierListOwner>();
|
||||
if (!visited.add(superMethod)) continue;
|
||||
if (!resolveHelper.isAccessible(superMethod, owner, null)) continue;
|
||||
annotations = ArrayUtil.mergeArrays(annotations, getAllAnnotations(superMethod, true, visited));
|
||||
annotations = ArrayUtil.mergeArrays(annotations, getAllAnnotations(superMethod, true, visited, withInferred));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -508,7 +508,7 @@ public class AnnotationUtil {
|
||||
if (!resolveHelper.isAccessible(superMethod, owner, null)) continue;
|
||||
PsiParameter[] superParameters = superMethod.getParameterList().getParameters();
|
||||
if (index < superParameters.length) {
|
||||
annotations = ArrayUtil.mergeArrays(annotations, getAllAnnotations(superParameters[index], true, visited));
|
||||
annotations = ArrayUtil.mergeArrays(annotations, getAllAnnotations(superParameters[index], true, visited, withInferred));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user