Skip to content

Commit

Permalink
Merge pull request #127 from sputnikfort/v4
Browse files Browse the repository at this point in the history
fix while(true) moment
  • Loading branch information
Revxrsal authored Jan 24, 2025
2 parents c24d09f + e7b9d92 commit ef73491
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/src/main/java/revxrsal/commands/util/Reflections.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ public static List<Class<?>> getTopClasses(Class<?> c) {
List<Class<?>> classes = new ArrayList<>();
classes.add(c);
Class<?> enclosingClass = c.getEnclosingClass();
while (c.getEnclosingClass() != null) {
while (enclosingClass != null) {
classes.add(c = enclosingClass);
enclosingClass = c.getEnclosingClass();
}
java.util.Collections.reverse(classes);
return classes;
Expand Down

0 comments on commit ef73491

Please sign in to comment.