@Getter(onMethod = @__( is not working with jackson

656 views
Skip to first unread message

Kumar Thangavel

unread,
Jan 18, 2018, 11:20:21 AM1/18/18
to Project Lombok
Hi , 

We upgraded to a new version of Lombok(1.16.20) and the @Getter is not working with Jackson @jsonProperty annotation. It is working fine with (1.16.18). Requesting to help us regarding this problem.

I am pasting the code that fails

@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonPropertyOrder(alphabetic = true)
@JsonInclude(value = Include.NON_EMPTY)
public class Device {

@Getter(onMethod = @__(@JsonProperty("deviceplatform"))) ==> This bit is not getting converted
@Setter(onMethod = @__(@JsonProperty("deviceplatform")), value = AccessLevel.PRIVATE)
private String platform;

@Getter(onMethod = @__(@JsonProperty("devicetype"))) ==> This bit is not getting converted
@Setter(onMethod = @__(@JsonProperty("devicetype")), value = AccessLevel.PRIVATE)
private String type;
}
Reply all
Reply to author
Forward
0 new messages