[bugfix][@Jacksonized] javac handler of jacksonized checked for existing jackson annotations on the wrong node.

This commit is contained in:
Reinier Zwitserloot committed 2026-02-06 01:51:10 +01:00
1 parent 12572fcbd2
commit 3db0a6c1fc
1 file changed
+2 -2
@@ -116,8 +116,8 @@ public class HandleJacksonized extends JavacAnnotationHandler<Jacksonized> {
// Add @JsonIgnore to all transient fields. It will be automatically copied to the getter/setters later.
for (JavacNode javacNode : tdNode.down()) {
if (javacNode.getKind() == Kind.FIELD) {
if (hasAnnotation(annotationNode, JacksonAnnotationType.JSON_PROPERTY2) ||
hasAnnotation(annotationNode, JacksonAnnotationType.JSON_IGNORE2)) {
if (hasAnnotation(javacNode, JacksonAnnotationType.JSON_PROPERTY2) ||
hasAnnotation(javacNode, JacksonAnnotationType.JSON_IGNORE2)) {
return;
} else if (javacNode.isTransient()) {