mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Stream API Migration: do not add type arguments if a type is a wildcard type
This commit is contained in:
+1
-1
@@ -993,7 +993,7 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo
|
||||
operationName = "mapToObj";
|
||||
}
|
||||
PsiExpression expression = myType == null ? myExpression : RefactoringUtil.convertInitializerToNormalExpression(myExpression, myType);
|
||||
if(myType != null && !(myType instanceof PsiPrimitiveType)) {
|
||||
if(myType != null && !(myType instanceof PsiPrimitiveType) && !(myType instanceof PsiCapturedWildcardType)) {
|
||||
operationName = "<"+myType.getCanonicalText()+">"+operationName;
|
||||
}
|
||||
return "." + operationName + "(" + LambdaUtil.createLambda(myVariable, expression) + ")";
|
||||
|
||||
Reference in New Issue
Block a user