diff --git a/src/main/java/tools/redstone/redstonetools/utils/ReflectionUtils.java b/src/main/java/tools/redstone/redstonetools/utils/ReflectionUtils.java index e80d7ceb..e9c91ff0 100644 --- a/src/main/java/tools/redstone/redstonetools/utils/ReflectionUtils.java +++ b/src/main/java/tools/redstone/redstonetools/utils/ReflectionUtils.java @@ -108,10 +108,9 @@ private static Set serviceLoad(Class clazz) throws IOExcepti .collect(Collectors.toSet()); } - @SuppressWarnings("unchecked") - private static @Nullable Class loadClass(String className) { + private static @Nullable Class loadClass(String className) { try { - return (Class) Class.forName(className); + return Class.forName(className); } catch (ClassNotFoundException e) { throw new RuntimeException("Failed to load class " + className, e); } catch (NoClassDefFoundError e) {