We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
The text was updated successfully, but these errors were encountered:
Can you post a project that fails? I built the example below that works correctly.
java21test.zip
cd java21test mvn clean verify mvn exec:java -Dexec.mainClass=test.Main
This is my Java version:
$ java -version java version "21.0.2" 2024-01-16 LTS Java(TM) SE Runtime Environment (build 21.0.2+13-LTS-58) Java HotSpot(TM) 64-Bit Server VM (build 21.0.2+13-LTS-58, mixed mode, sharing)
Sorry, something went wrong.
No branches or pull requests
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.
The text was updated successfully, but these errors were encountered: