boolean (@NotNull PsiExpression expression, @Nullable Object defaultValue, @Nullable PsiType lType) { if (ExpressionUtils.isNullLiteral(expression) && defaultValue == null) return true; Object constantValue = ExpressionUtils.computeConstantExpression(expression); PsiType rType = expression.getType(); if (rType instanceof PsiPrimitiveType && lType instanceof PsiPrimitiveType) { if (defaultValue instanceof Number && constantValue instanceof Number) { return ((Number)defaultValue).doubleValue() == ((Number)constantValue).doubleValue(); } } return constantValue != null && constantValue.equals(defaultValue); }