mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-11 12:19:00 +00:00
Update Eclipse Jacksonized Handler
This commit is contained in:
1 parent
89abb18004
commit
39a178a447
1 file changed
+7
-7
@@ -193,13 +193,13 @@ public class HandleJacksonized extends EclipseAnnotationHandler<Jacksonized> {
|
||||
// Add @JsonProperty to all fields. It will be automatically copied to the getter/setters later.
|
||||
for (EclipseNode eclipseNode : tdNode.down()) {
|
||||
if (eclipseNode.getKind() == Kind.FIELD) {
|
||||
if (hasAnnotation(eclipseNode, JacksonAnnotationType.JSON_PROPERTY2) ||
|
||||
hasAnnotation(eclipseNode, JacksonAnnotationType.JSON_IGNORE2)) {
|
||||
return;
|
||||
} else if (eclipseNode.isTransient()) {
|
||||
createJsonIgnoreForField(eclipseNode, annotationNode);
|
||||
} else {
|
||||
createJsonPropertyForField(eclipseNode, annotationNode);
|
||||
if (!hasAnnotation(eclipseNode, JacksonAnnotationType.JSON_PROPERTY2) &&
|
||||
!hasAnnotation(eclipseNode, JacksonAnnotationType.JSON_IGNORE2)) {
|
||||
if (eclipseNode.isTransient()) {
|
||||
createJsonIgnoreForField(eclipseNode, annotationNode);
|
||||
} else {
|
||||
createJsonPropertyForField(eclipseNode, annotationNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user