boolean ( PsiTryStatement tryStatement, PsiVariable boundVariable, LockType type) { final PsiCodeBlock finallyBlock = tryStatement.getFinallyBlock(); if (finallyBlock == null) { return false; } final PsiCodeBlock tryBlock = tryStatement.getTryBlock(); if (tryBlock == null) { return false; } final UnlockVisitor visitor = new UnlockVisitor(boundVariable, type); finallyBlock.accept(visitor); return visitor.containsUnlock(); }