From ecd9917c6f01d9dc47e3ce4e1c99315d9bf2202b Mon Sep 17 00:00:00 2001 From: Gavin King Date: Mon, 16 Dec 2024 20:30:00 +0100 Subject: [PATCH] use an anon function --- .../main/java/org/hibernate/processor/util/TypeUtils.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/util/TypeUtils.java b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/util/TypeUtils.java index 33afa615b0..822c8d129f 100644 --- a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/util/TypeUtils.java +++ b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/util/TypeUtils.java @@ -36,7 +36,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.function.Function; import static java.beans.Introspector.decapitalize; import static org.hibernate.processor.util.AccessTypeInformation.DEFAULT_ACCESS_TYPE; @@ -190,12 +189,7 @@ public final class TypeUtils { return context.getTypeUtils().getDeclaredType( typeElement, declaredType.getTypeArguments().stream() - .map( new Function() { - @Override - public @Nullable TypeMirror apply(TypeMirror arg) { - return extractClosestRealType( arg, context, beingVisited ); - } - } ) + .map( arg -> extractClosestRealType( arg, context, beingVisited ) ) .toArray( TypeMirror[]::new ) ); default: