From 5584f6ac6c58da9b3082627d5dbd96f8914d6781 Mon Sep 17 00:00:00 2001 From: Killian Date: Sun, 28 Jan 2024 18:29:42 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(ReflectionUtils):=20don't=20?= =?UTF-8?q?crash=20lol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/redstone/redstonetools/utils/ReflectionUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/tools/redstone/redstonetools/utils/ReflectionUtils.java b/src/main/java/tools/redstone/redstonetools/utils/ReflectionUtils.java index eaab5ad7..5792620a 100644 --- a/src/main/java/tools/redstone/redstonetools/utils/ReflectionUtils.java +++ b/src/main/java/tools/redstone/redstonetools/utils/ReflectionUtils.java @@ -108,12 +108,12 @@ public static Set> findClasses(Class clazz) throws IOE } } //noinspection unchecked - return (Set>) classNames.stream() + return classNames.stream() .filter(it -> !it.isEmpty() && !it.isBlank()) .map(ReflectionUtils::loadClass) .filter(Objects::nonNull) .filter(clazz::isAssignableFrom) - .map(clazz::cast) + .map(it -> (Class) it) .collect(Collectors.toSet()); }