This commit is contained in:
Alexey Kudravtsev
2017-04-13 18:02:50 +03:00
parent 6b248d23f0
commit 8ca9a64189
16 changed files with 96 additions and 186 deletions

View File

@@ -146,7 +146,7 @@ public class RefJavaUtilImpl extends RefJavaUtil{
}
final Collection<PsiClassType> exceptionTypes = body != null ? ExceptionUtil.collectUnhandledExceptions(body, topElement, false)
: Collections.<PsiClassType>emptyList();
: Collections.emptyList();
RefElement refResolved = refFrom.getRefManager().getReference(interfaceMethod);
if (refResolved instanceof RefMethodImpl) {
for (final PsiClassType exceptionType : exceptionTypes) {
@@ -301,7 +301,7 @@ public class RefJavaUtilImpl extends RefJavaUtil{
public RefClass getTopLevelClass(@NotNull RefElement refElement) {
RefEntity refParent = refElement.getOwner();
while (refParent != null && refParent instanceof RefElement && !(refParent instanceof RefFile)) {
while (refParent instanceof RefElement && !(refParent instanceof RefFile)) {
refElement = (RefElementImpl)refParent;
refParent = refParent.getOwner();
}
@@ -458,13 +458,13 @@ public class RefJavaUtilImpl extends RefJavaUtil{
if (a == PsiModifier.PRIVATE) {
return 0;
}
else if (a == PsiModifier.PACKAGE_LOCAL) {
if (a == PsiModifier.PACKAGE_LOCAL) {
return 1;
}
else if (a == PsiModifier.PROTECTED) {
if (a == PsiModifier.PROTECTED) {
return 2;
}
else if (a == PsiModifier.PUBLIC) return 3;
if (a == PsiModifier.PUBLIC) return 3;
return -1;
}