Skip to content

Commit

Permalink
Exclude synthetic fields
Browse files Browse the repository at this point in the history
  • Loading branch information
knighto82 committed Jan 14, 2025
1 parent ff145bb commit 7b9bd9b
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static Set<String> getFieldNames(Class<? extends CatalogResource> resourc

// Stream the fields, map names, and filter out synthetic fields like "this$0"
return Arrays.stream(resourceClass.getDeclaredFields())
.filter(f -> !f.isSynthetic())
.map(Field::getName)
.filter(name -> !name.startsWith("__$") && !name.equals("this$0"))
.collect(Collectors.toCollection(LinkedHashSet::new));
Expand Down

0 comments on commit 7b9bd9b

Please sign in to comment.