boolean (PsiExpression expression) { if (!isResourceCreation(expression)) { return false; } final PsiVariable boundVariable = getVariable(expression); return !(boundVariable instanceof PsiResourceVariable) && !isSafelyClosed(boundVariable, expression) && !isResourceFactoryClosed(expression) && !isResourceEscaping(boundVariable, expression) && !isSafelyClosedResource(expression); }