Describe the bug
In Eclipes IDE lombok fails to copy the Jackson annotation @JsonUnwrapped from a record to the method on @builder's. This works fine outside of Eclipse IDE. This issue seems related to #2736
Notice, this seems to work fine if used with class rather than record
To Reproduce
Run the following test case, this will fail in Eclipse as the @JsonUnwrapped is not copied to the builder() class method inner(). The same test case will work outside of Eclipse.
package test;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import java.util.Arrays;
import lombok.Builder;
import lombok.extern.jackson.Jacksonized;
class RecordAnnotationsNotCopiedTest {
@Builder
@Jacksonized
record Example(@JsonUnwrapped Inner inner) {}
record Inner(String s) {}
@Test
void testLombok() throws NoSuchMethodException, SecurityException {
var method = Arrays.asList(Example.builder().getClass().getMethods()).stream().filter(m -> m.getName().equals("inner")).findFirst().get();
assertThat(method.getAnnotations().length).isEqualTo(1);
}
}
Expected behavior
This should also work in Eclipse IDE.
Version info (please complete the following information):
- Lombok v1.18.24
- Platform Eclipse Version: 2022-06 (4.24.0)
Describe the bug
In Eclipes IDE lombok fails to copy the Jackson annotation @JsonUnwrapped from a record to the method on @builder's. This works fine outside of Eclipse IDE. This issue seems related to #2736
Notice, this seems to work fine if used with class rather than record
To Reproduce
Run the following test case, this will fail in Eclipse as the @JsonUnwrapped is not copied to the builder() class method inner(). The same test case will work outside of Eclipse.
Expected behavior
This should also work in Eclipse IDE.
Version info (please complete the following information):