boolean (@NotNull PsiNewExpression newExpression, PsiVariable variable, @NotNull Set<MethodSignature> checkedMethods, boolean strict) { final PsiExpressionList argumentList = newExpression.getArgumentList(); if (argumentList != null) { for (final PsiExpression argument : argumentList.getExpressions()) { if (expressionAssignsVariableOrFails(argument, variable, checkedMethods, strict)) { return true; } } } if (expressionAssignsVariableOrFails(newExpression.getArrayInitializer(), variable, checkedMethods, strict)) { return true; } for (final PsiExpression dimension : newExpression.getArrayDimensions()) { if (expressionAssignsVariableOrFails(dimension, variable, checkedMethods, strict)) { return true; } } return false; }