From c8707966be307fd58e64dd405b2c6d06c0fa690c Mon Sep 17 00:00:00 2001 From: Looly Date: Tue, 28 Feb 2023 21:09:54 +0800 Subject: [PATCH] add version --- .../src/main/java/cn/hutool/core/lang/func/LambdaFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hutool-core/src/main/java/cn/hutool/core/lang/func/LambdaFactory.java b/hutool-core/src/main/java/cn/hutool/core/lang/func/LambdaFactory.java index b5369995b..38401bc96 100644 --- a/hutool-core/src/main/java/cn/hutool/core/lang/func/LambdaFactory.java +++ b/hutool-core/src/main/java/cn/hutool/core/lang/func/LambdaFactory.java @@ -65,11 +65,11 @@ public class LambdaFactory { * @return 接受Lambda的函数式接口对象 * @param Function类型 */ + @SuppressWarnings("unchecked") public static F build(final Class functionInterfaceType, final Method method) { Assert.notNull(functionInterfaceType); Assert.notNull(method); final MutableEntry, Method> cacheKey = new MutableEntry<>(functionInterfaceType, method); - //noinspection unchecked return (F) CACHE.computeIfAbsent(cacheKey, key -> { final List abstractMethods = Arrays.stream(functionInterfaceType.getMethods()) .filter(m -> Modifier.isAbstract(m.getModifiers()))