Skip to content

Commit

Permalink
πŸ› fix(ReflectionUtils): don't crash lol
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrm-en committed Jan 28, 2024
1 parent 874c8f9 commit 5584f6a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ public static <T> Set<Class<? extends T>> findClasses(Class<T> clazz) throws IOE
}
}
//noinspection unchecked
return (Set<Class<? extends T>>) 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<? extends T>) it)
.collect(Collectors.toSet());
}

Expand Down

0 comments on commit 5584f6a

Please sign in to comment.