fix AnnotateMethodTest

This commit is contained in:
peter
2014-07-10 10:36:00 +02:00
parent e0861b8d65
commit ee888c2f1f
2 changed files with 7 additions and 7 deletions
@@ -418,7 +418,7 @@ public class NullableStuffInspectionBase extends BaseJavaBatchLocalInspectionToo
private static boolean isNotNullNotInferred(@NotNull PsiMethod superMethod) {
Project project = superMethod.getProject();
PsiAnnotation notNull = NullableNotNullManager.getInstance(project).getNotNullAnnotation(superMethod);
PsiAnnotation notNull = NullableNotNullManager.getInstance(project).getNotNullAnnotation(superMethod, true);
return notNull != null && !InferredAnnotationsManager.getInstance(project).isInferredAnnotation(notNull);
}
@@ -94,13 +94,13 @@ public class NullableNotNullManager implements PersistentStateComponent<Element>
@Nullable
public String getNullable(PsiModifierListOwner owner) {
PsiAnnotation annotation = getNullableAnnotation(owner);
PsiAnnotation annotation = getNullableAnnotation(owner, false);
return annotation == null ? null : annotation.getQualifiedName();
}
@Nullable
public PsiAnnotation getNullableAnnotation(PsiModifierListOwner owner) {
return findNullabilityAnnotation(owner, false, true);
public PsiAnnotation getNullableAnnotation(PsiModifierListOwner owner, boolean checkBases) {
return findNullabilityAnnotation(owner, checkBases, true);
}
public void setDefaultNullable(@NotNull String defaultNullable) {
@@ -113,13 +113,13 @@ public class NullableNotNullManager implements PersistentStateComponent<Element>
}
@Nullable
public PsiAnnotation getNotNullAnnotation(PsiModifierListOwner owner) {
return findNullabilityAnnotation(owner, false, false);
public PsiAnnotation getNotNullAnnotation(PsiModifierListOwner owner, boolean checkBases) {
return findNullabilityAnnotation(owner, checkBases, false);
}
@Nullable
public String getNotNull(PsiModifierListOwner owner) {
PsiAnnotation annotation = getNotNullAnnotation(owner);
PsiAnnotation annotation = getNotNullAnnotation(owner, false);
return annotation == null ? null : annotation.getQualifiedName();
}