I am using Java 11 and Lombok 1.18.26. When I try to set the access level of my getter method to private using the @Getter annotation with the onMethod_ attribute, like this: @Getter(value = PRIVATE, onMethod_={@JsonGetter(value = "rating")})
, the access level is not set to private but instead defaults to public. However, when I use the @Getter annotation without the onMethod_ attribute, like this: @Getter(value = PRIVATE)
, the access level is correctly set to private. Has anyone else experienced this issue?
Asked
Active
Viewed 31 times
0

Denis Kisina
- 350
- 4
- 19