Skip to content

Commit

Permalink
exclude transients from annotated path detection
Browse files Browse the repository at this point in the history
  • Loading branch information
euberseder-hubspot committed Jan 10, 2024
1 parent 59a355d commit c43a434
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public AnnotatedMultiPropertyPathDetector(String prefix, String annotationName,

private boolean excludePropertyProcessing(Property p) {
return p.getAnnotations().stream()
.anyMatch(ann -> ann.getClassRef().getFullyQualifiedName().equals(ANNOTATION_JSON_IGNORE));
.anyMatch(ann -> ann.getClassRef().getFullyQualifiedName().equals(ANNOTATION_JSON_IGNORE)) || p.isTransient();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,8 @@ public AnnotatedPropertyPathDetector(String prefix, String annotationName, List<
}

private static boolean excludePropertyProcessing(Property p) {
for (AnnotationRef annotation : p.getAnnotations()) {
if (annotation.getClassRef().getFullyQualifiedName().equals(ANNOTATION_JSON_IGNORE)) {
return true;
}
}
return false;
return p.getAnnotations().stream()
.anyMatch(ann -> ann.getClassRef().getFullyQualifiedName().equals(ANNOTATION_JSON_IGNORE)) || p.isTransient();
}

@Override
Expand Down

0 comments on commit c43a434

Please sign in to comment.