Skip to content

Builder class is not being generated under Java 21 (was ok under Java 17) #168

@dmitrystalle

Description

@dmitrystalle

Describe the bug
Builder class was generated with Java 17 but is not generated under Java 21.

Version of used
40

Log file
There is no log for this issue, it is a maven compile "ClassNotFound" error.

To Reproduce:

We have our own @builder annotation with RecordBuilder like that:
@RecordBuilder.Template(options = @RecordBuilder.Options(addClassRetainedGenerated = true, addStaticBuilder = false))
@retention(RetentionPolicy.SOURCE)
https://github.com/target(ElementType.TYPE)
@inherited
public @interface Builder {}

And then we use:
@builder
public record SomeDto(
Long id,
Integer version,


)
implements IdentifiedDto, SomeDtoBuilder.With, InDataDomainDto {
^^^ This class SomeDtoBuilder is not generated/not found.

Under Java 17 the Builder class was generated, under Java 21 the class is no longer generated.

Expected behavior

The builder class is generated.

Additional context
Java 21.0.2 LTE and the latest libraries.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions