You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The annotation @JsonDeserialize is not created consistently for classes annotated with @Jacksonized and @Builder depending on the builderClassName and import statements on the class.
To Reproduce
The bytecode for this class will correctly have the @JsonDeserialize annotation as well as a builder annotated with @JsonPOJOBuilder
package ch.demo.lombok;
import lombok.Builder;
import lombok.extern.jackson.Jacksonized;
@Jacksonized
@Builder(builderClassName = "Builder")
public class LombokClassWithExplicitImportAndBuilderClassName {
private final String s;
}
However simply by replacing the import with a wildcard import the annotation is not generated, for example the annotation is not present on the bytecode of the following class:
package ch.demo.lombok;
import lombok.*;
import lombok.extern.jackson.Jacksonized;
@Jacksonized
@Builder(builderClassName = "Builder")
public class LombokClassWithWildcardImportAndBuilderClassName {
private final String s;
}
However again the above class will work with the wildcard imports by simply removing the builderClassName from the annotation:
package ch.demo.lombok;
import lombok.*;
import lombok.extern.jackson.Jacksonized;
@Jacksonized
@Builder
public class LombokClassWithWildcardImport {
private final String s;
}
Expected behavior
Consistently generate the annotations and builders etc. required for Jackson for classes annotated with @Jacksonized irrespective of other details such as builder class name and unrelated imports.
Version info
Lombok version 1.18.34
tested with java 17.0.4.1 (liberica)
Additional context
built using maven
built using jackson-databind and jackson-annotations dependencies version 2.17.1
The text was updated successfully, but these errors were encountered:
Thank you for reporting this issue. I guess this is some kind of type name confusion caused by your inner class Builder that hides the @Builder wildcard import. You could try to use a fully qualified builder annotation (@lombok.Builder).
Describe the bug
The annotation
@JsonDeserialize
is not created consistently for classes annotated with@Jacksonized
and@Builder
depending on the builderClassName and import statements on the class.To Reproduce
The bytecode for this class will correctly have the
@JsonDeserialize
annotation as well as a builder annotated with@JsonPOJOBuilder
However simply by replacing the import with a wildcard import the annotation is not generated, for example the annotation is not present on the bytecode of the following class:
However again the above class will work with the wildcard imports by simply removing the
builderClassName
from the annotation:Expected behavior
Consistently generate the annotations and builders etc. required for Jackson for classes annotated with @Jacksonized irrespective of other details such as builder class name and unrelated imports.
Version info
Additional context
The text was updated successfully, but these errors were encountered: