void (PsiClassType exceptionType) { LOG.assertTrue(isInitialized()); myManager.executeTask(() -> { for (RefMethod refSuper : getSuperMethods()) { refSuper.initializeIfNeeded(); ((RefMethodImpl)refSuper).updateThrowsList(exceptionType); } }); synchronized (this) { List<String> unThrownExceptions = myUnThrownExceptions; if (unThrownExceptions != null) { if (exceptionType == null) { myUnThrownExceptions = null; } else { PsiClass exceptionClass = exceptionType.resolve(); JavaPsiFacade facade = JavaPsiFacade.getInstance(myManager.getProject()); for (int i = unThrownExceptions.size() - 1; i >= 0; i--) { String exceptionFqn = unThrownExceptions.get(i); PsiClass classType = facade.findClass(exceptionFqn, GlobalSearchScope.allScope(getRefManager().getProject())); if (InheritanceUtil.isInheritorOrSelf(exceptionClass, classType, true) || InheritanceUtil.isInheritorOrSelf(classType, exceptionClass, true)) { unThrownExceptions.remove(i); } } if (unThrownExceptions.isEmpty()) myUnThrownExceptions = null; } } } }