resolve yellow code

This commit is contained in:
Dmitry Batkovich
2017-11-29 11:26:24 +03:00
parent 790b19c055
commit fb7e00099e
@@ -61,7 +61,7 @@ public class ObscureThrownExceptionsIntention extends MutablyNamedIntention {
if (firstClass == null || types.length == 1) {
return firstClass;
}
Set<PsiClass> sourceSet = new HashSet();
Set<PsiClass> sourceSet = new HashSet<>();
PsiClass aClass = firstClass;
while (aClass != null) {
sourceSet.add(aClass);
@@ -70,7 +70,7 @@ public class ObscureThrownExceptionsIntention extends MutablyNamedIntention {
if (sourceSet.isEmpty()) {
return null;
}
Set<PsiClass> targetSet = new HashSet();
Set<PsiClass> targetSet = new HashSet<>();
final int max = types.length - 1;
for (int i = 1; i < max; i++) {
final PsiClassType classType = types[i];
@@ -82,7 +82,7 @@ public class ObscureThrownExceptionsIntention extends MutablyNamedIntention {
aClass1 = aClass1.getSuperClass();
}
sourceSet = targetSet;
targetSet = new HashSet();
targetSet = new HashSet<>();
}
PsiClass aClass1 = types[max].resolve();
while (aClass1 != null && !sourceSet.contains(aClass1)) {