[duplicates] enable duplicates analysis in PyCharm/WebStorm/PhpStorm/RubyMine

GitOrigin-RevId: 1545b79fdca4888f4b94f47f22703fd37694fa7a
This commit is contained in:
Alexandr Suhinin
2019-05-13 15:56:13 +03:00
committed by intellij-monorepo-bot
parent e12af508c9
commit 9215f4240b
5566 changed files with 30749 additions and 145848 deletions

View File

@@ -295,7 +295,7 @@ public abstract class NullableNotNullManager {
return null;
}
private PsiAnnotation takeAnnotationFromSuperParameters(@NotNull PsiParameter owner, @NotNull List<? extends PsiParameter> superOwners) {
private PsiAnnotation takeAnnotationFromSuperParameters(@NotNull PsiParameter owner, @NotNull List<PsiParameter> superOwners) {
return RecursionManager.doPreventingRecursion(owner, true, () -> {
for (PsiParameter superOwner : superOwners) {
PsiAnnotation anno = findNullityAnnotationWithDefault(superOwner, false, false);
@@ -310,17 +310,6 @@ public abstract class NullableNotNullManager {
return findPlainAnnotation(owner, checkBases, qNames);
}
/**
* @return an annotation (if any) with the given nullability semantics on the given declaration or its type. In case of conflicts,
* type annotations are preferred.
*/
@Nullable
public PsiAnnotation findExplicitNullabilityAnnotation(@NotNull PsiModifierListOwner owner, @NotNull Nullability nullability) {
if (nullability == Nullability.UNKNOWN) return null;
List<String> names = nullability == Nullability.NULLABLE ? getNullablesWithNickNames() : getNotNullsWithNickNames();
return findPlainAnnotation(owner, false, new HashSet<>(names));
}
@Nullable
private static PsiAnnotation findPlainAnnotation(@NotNull PsiModifierListOwner owner,
boolean checkBases,