Remove Lombok from the code
Description
blocks
Activity

Sean Flanigan 18 January 2017 at 06:47
Instead of finding replacements for Lombok's features up front, we are just running Delombok in bulk. This will avoid problems with compilation order when kotlin-maven-plugin is introduced.

Sean Flanigan 3 August 2016 at 23:58Edited
Replacements (draft, subject to change):
Lombok | Kotlin equiv. |
---|---|
| extend a type with |
Getter | val/var properties |
Setter | var properties |
RequiredArgsConstructor | var/val properties in primary constructor (with some default values) |
AllArgsConstructor | var/val in primary constructor |
NoArgsConstructor | no-arg/jpa plugin for Kotlin compiler |
EqualsAndHashCode | see data class |
ToString | see data class |
AccessLevel | public/private/internal property modifiers |
Data | data class with var |
Value | data class with val |
Wither | data class |
Cleanup | "use" extension method |
NonNull | A (as opposed to A?) |
Details
Details
Assignee

Reporter

Tested Version/s
Story Points
Components
Sprint
Fix versions
Priority

Lombok has some nice features, but it isn't really Java. To achieve the things it does, it messes with compiler internals, which can and does lead to compatibility problems when switching or upgrading the Java compiler.
This has already caused problems for us when trying to switch to the Eclipse compiler (with its nice incremental compilation) combined with the Eclipse compiler's Groovy support and also with javac when Java 8 was new.
For instance,
@lombok.Delegate
has been deprecated and marked experimental and "support for this feature may be dropped if future versions of javac or ecj make it difficult to continue to maintain the feature": https://projectlombok.org/features/experimental/Delegate.htmlWe should switch to an alternative (eg Jackdaw, Immutables, AutoValue) where it makes sense, and simply Delombok the code where there is no practical alternative (eg
@Slf4j
).https://github.com/vbauer/jackdaw
http://immutables.github.io/
https://github.com/google/auto/tree/master/value
https://projectlombok.org/features/delombok.html