void (@NotNull PsiElement element) { if (element instanceof PsiField || element instanceof PsiClassInitializer || element instanceof PsiMethod && ((PsiMethod)element).isConstructor()) { m_inInitializer = false; } if (element instanceof PsiClass && !element.equals(aClass) || element instanceof PsiLambdaExpression) { m_inSynchronizedContextCount = contextStack.pop(); m_inInitializer = contextInitializerStack.pop(); } if (element instanceof PsiCodeBlock && element.getParent() instanceof PsiSynchronizedStatement) { m_inSynchronizedContextCount--; } else if (element instanceof PsiMethod method) { if (method.hasModifierProperty(PsiModifier.SYNCHRONIZED) || methodIsAlwaysUsedSynchronized(method)) { m_inSynchronizedContextCount--; } } if (element.getUserData(CODE_BLOCK_CONTAINS_HOLDS_LOCK_CALL) != null) { m_inSynchronizedContextCount--; element.putUserData(CODE_BLOCK_CONTAINS_HOLDS_LOCK_CALL, null); } }