From 3a5399eaebcdcd8f5b5ed34293e891b18fa46070 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Wed, 21 Aug 2024 11:04:57 +0200 Subject: [PATCH] Work around upstream change to how generics are passed down - https://github.com/openrewrite/rewrite/pull/4427 --- .../staticanalysis/ExplicitLambdaArgumentTypes.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/openrewrite/staticanalysis/ExplicitLambdaArgumentTypes.java b/src/main/java/org/openrewrite/staticanalysis/ExplicitLambdaArgumentTypes.java index 84d1eb922..2d01e5b47 100755 --- a/src/main/java/org/openrewrite/staticanalysis/ExplicitLambdaArgumentTypes.java +++ b/src/main/java/org/openrewrite/staticanalysis/ExplicitLambdaArgumentTypes.java @@ -172,7 +172,8 @@ private J.VariableDeclarations maybeAddTypeExpression(J.VariableDeclarations mul } else if (type instanceof JavaType.GenericTypeVariable) { JavaType.GenericTypeVariable genericType = (JavaType.GenericTypeVariable) type; - if (!genericType.getName().equals("?")) { + if (!"?".equals(genericType.getName()) && + !"".equals(genericType.getName())) { return new J.Identifier(Tree.randomId(), space, Markers.EMPTY,