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
TL;DR: @Wither no longer generates withXxx methods if it is imported with a star import like import lombok.experimental.*
Since Lombok version 1.18.10, @Wither has been promoted. @lombok.experimental.Wither still exists but is marked @Deprecated. It is replaced by @lombok.With.
Although we have tests to see if the old annotation still works, we didn't have a test that used a star import.
Workaround 1
Use @lombok.With or @With in combination with an import instead of @Wither in combination with import lombok.experimental.*;. This will also take care of deprecation warnings.
Workaround 2
Use @lombok.experimental.Wither instead of @Wither in combination with import lombok.experimental.*;. This is longer, but will work in all cases.
Workaround 3
Replace import lombok.experimental.* with import lombok.experimental.Wither.
Potentially you also need to add imports for other experimental features.
You might need to change the import rules in your IDE to not collapse multiple imports to a star import.
The text was updated successfully, but these errors were encountered:
rspilker
changed the title
Regression in 1.18.10: @Wither no longer generates code (workarounds available)
Regression in 1.18.10: @Wither broken (workarounds available)
Sep 12, 2019
TL;DR:
@Wither
no longer generateswithXxx
methods if it is imported with a star import likeimport lombok.experimental.*
Since Lombok version 1.18.10,
@Wither
has been promoted.@lombok.experimental.Wither
still exists but is marked@Deprecated
. It is replaced by@lombok.With
.Although we have tests to see if the old annotation still works, we didn't have a test that used a star import.
Workaround 1
Use
@lombok.With
or@With
in combination with an import instead of@Wither
in combination withimport lombok.experimental.*;
. This will also take care of deprecation warnings.Workaround 2
Use
@lombok.experimental.Wither
instead of@Wither
in combination withimport lombok.experimental.*;
. This is longer, but will work in all cases.Workaround 3
Replace
import lombok.experimental.*
withimport lombok.experimental.Wither
.Potentially you also need to add imports for other experimental features.
You might need to change the import rules in your IDE to not collapse multiple imports to a star import.
The text was updated successfully, but these errors were encountered: