mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -327,7 +327,7 @@ public class AnonymousCanBeLambdaInspection extends BaseJavaBatchLocalInspection
|
||||
public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
|
||||
final PsiElement element = descriptor.getPsiElement();
|
||||
if (element != null) {
|
||||
replacePsiElementWithLambda(element, false, true);
|
||||
replacePsiElementWithLambda(element, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class GuavaFunctionAndPredicateConverter {
|
||||
if (expression instanceof PsiNewExpression) {
|
||||
final PsiAnonymousClass anonymousClass = ((PsiNewExpression)expression).getAnonymousClass();
|
||||
if (anonymousClass != null && AnonymousCanBeLambdaInspection.canBeConvertedToLambda(anonymousClass, true)) {
|
||||
final PsiExpression lambdaExpression = AnonymousCanBeLambdaInspection.replacePsiElementWithLambda(expression, true, true);
|
||||
final PsiExpression lambdaExpression = AnonymousCanBeLambdaInspection.replacePsiElementWithLambda(expression, true, false);
|
||||
LOG.assertTrue(lambdaExpression != null);
|
||||
return lambdaExpression.getText();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user