Skip to content

Commit

Permalink
perhaps fix the bug crashing everything
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNavaStar committed Aug 24, 2024
1 parent ce66c8a commit c9632ea
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ public class Furious {
}

private static void recursiveRegister(Class<?> type, List<Class<?>> registered) {
if (type == null || registered.contains(type)) return;
if (type == null || type == Object.class || registered.contains(type)) return;
FURY.register(type);
registered.add(type);

List.of(type.getDeclaredFields()).forEach(field -> recursiveRegister(field.getType(), registered));
List.of(R.of(type).generics()).forEach(t -> recursiveRegister(t, registered));
recursiveRegister(type.getSuperclass(), registered);
if (!type.isEnum()) recursiveRegister(type.getSuperclass(), registered);
}

public static void register(Class<?> type) {
Expand Down

0 comments on commit c9632ea

Please sign in to comment.