mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
guava type migration: add type cast to method reference IDEA-152409
This commit is contained in:
+11
-2
@@ -98,8 +98,17 @@ public class GuavaConversionUtil {
|
||||
}
|
||||
else {
|
||||
final GuavaLambda lambda = GuavaLambda.findFor(evaluator.evaluateType(expression));
|
||||
return lambda == null ? expression
|
||||
: addMethodReference(expression, lambda);
|
||||
if (lambda == null) {
|
||||
return expression;
|
||||
}
|
||||
else {
|
||||
final PsiExpression expressionWithMethodReference = addMethodReference(expression, lambda);
|
||||
if (insertTypeCase) {
|
||||
return adjustLambdaContainingExpression(expressionWithMethodReference, true, targetType, evaluator);
|
||||
} else {
|
||||
return expressionWithMethodReference;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (expression instanceof PsiMethodReferenceExpression) {
|
||||
|
||||
Reference in New Issue
Block a user