mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-02 00:57:59 +07:00
NPE
This commit is contained in:
+4
-2
@@ -207,8 +207,10 @@ public class SimplifyOptionalCallChainsInspection extends AbstractBaseJavaLocalI
|
||||
if (expression instanceof PsiMethodReferenceExpression) {
|
||||
PsiMethodReferenceExpression methodRef = (PsiMethodReferenceExpression)expression;
|
||||
PsiLambdaExpression lambda = LambdaRefactoringUtil.createLambda(methodRef, true);
|
||||
LambdaRefactoringUtil.specifyLambdaParameterTypes(methodRef.getFunctionalInterfaceType(), lambda);
|
||||
return lambda;
|
||||
if (lambda != null) {
|
||||
LambdaRefactoringUtil.specifyLambdaParameterTypes(methodRef.getFunctionalInterfaceType(), lambda);
|
||||
return lambda;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ public class LambdaRefactoringUtil {
|
||||
|
||||
@Nullable
|
||||
public static PsiParameterList specifyLambdaParameterTypes(PsiType functionalInterfaceType,
|
||||
PsiLambdaExpression lambdaExpression) {
|
||||
@NotNull PsiLambdaExpression lambdaExpression) {
|
||||
String typedParamList = createLambdaParameterListWithFormalTypes(functionalInterfaceType, lambdaExpression, false);
|
||||
if (typedParamList != null) {
|
||||
PsiParameterList paramListWithFormalTypes = JavaPsiFacade.getElementFactory(lambdaExpression.getProject())
|
||||
|
||||
Reference in New Issue
Block a user