Lazy Diary @ Hatena Blog

PowerShell / Java / miscellaneous things about software development, Tips & Gochas. CC BY-SA 4.0/Apache License 2.0

Delombok removes super(); in default constructors


  • You have a class that has one or more constructors other than default constructor, so you have to define the default constructor explicitly.
  • You use Lombok to generate some methods/fields.
  • You use static code analyzers that warn empty method definitions or empty blocks, so you write super(); in the default constructor to suppress warnings.


When you delombok the class, super(); in the default constructor disappears and the static code analyzer warns that an empty method definition is found.


It seems by design of* classes. Lombok uses them to delombok method definition, and just call print(tree.body); to print method body.


If your static code analyzer respects @SuppressWarnings annotations (like PMD), add it in front of the default constructor.