Skip to content

Commit

Permalink
Merge pull request #897 from pietro-lopes/registry-scanner
Browse files Browse the repository at this point in the history
restrict scanning fields to static only
  • Loading branch information
LatvianModder authored Sep 6, 2024
2 parents 7f90fab + 2b16b26 commit 1b36c00
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private static void processClass(Stream<Class<?>> classStream) {
.flatMap(Stream::of)
.forEach(field -> {
try {
if (!VALID_TYPES.get().contains(field.getType())) {
if (!VALID_TYPES.get().contains(field.getType()) || !Modifier.isStatic(field.getModifiers())) {
return;
}

Expand Down

0 comments on commit 1b36c00

Please sign in to comment.