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
@Getter
@AllArgsConstructor
class FooFoo {
private String text;
}
@Getter
class BarBar<T> extends FooFoo {
private T content;
@Builder
public BarBar(String text, T content) {
super(text);
this.content = content;
}
}
class Main {
public static void main(String[] args) {
BarBar<BigDecimal> barBar = BarBar.<BigDecimal>builder().text("Hiho").content(BigDecimal.ONE).build();
}
}
For some reasons my IDE (IntelliJ IDEA) complains about ".content(BigDecimal.ONE)" with "content(T) cannot be applied to content(BigDecimal)".
However the code compiles fine!
When I use the Delombok feature of the plugin, it creates a non-generic builder and the delomboked code does not compile at all.
I need to add parameter to the generated builder to make it work.
The text was updated successfully, but these errors were encountered:
Have a look at this code:
For some reasons my IDE (IntelliJ IDEA) complains about ".content(BigDecimal.ONE)" with "content(T) cannot be applied to content(BigDecimal)".
However the code compiles fine!
When I use the Delombok feature of the plugin, it creates a non-generic builder and the delomboked code does not compile at all.
I need to add parameter to the generated builder to make it work.
The text was updated successfully, but these errors were encountered: