-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
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
[BUG] @SuperBuilder with a class with generic types #3641
Comments
I noticed this bug yesterday as well and made an SO post on it: https://stackoverflow.com/q/78264233/8353218. Basically, the default constructor works for regular classes, but not generic classes. Works: @SuperBuilder
public class MyRegularSuperObject {
private final String someString;
protected MyRegularSuperObject(MyRegularSuperObject.MyRegularSuperObjectBuilder<?,?> b) {
someString = b.someString;
}
} Does not work: @SuperBuilder
public class MyGenericSuperObject<T> {
private final String someString;
protected MyGenericSuperObject(MyGenericSuperObjectBuilder<T,?,?> b) {
someString = b.someString;
}
} The following error is thrown:
Hope someone takes a look at this, as this is a very important use case for me and probably many others. Right now, I have to delombok in order to get this working, but it creates so much boiler plate and makes the code so much harder to understand... |
There is already a PR in the works: #3646 |
This is great news. Thanks. |
Describe the bug
I'm running into an issue attempting to use the @SuperBuilder annotation with a class with generic types.
To Reproduce
Works .. Allows me to provide my own customized constructor.
Sample Code...
Fails (The constructor was taken from de-lomboked code). Error message is...
Sample Code...
Version info (please complete the following information):
The text was updated successfully, but these errors were encountered: