delomboked enum source doesn't respect emptyLines:blank format setting #664

lombokissues opened this Issue Jul 14, 2015 · 4 comments


None yet

1 participant


Migrated from Google Code (issue 629)


👤 steven676   🕗 Jan 16, 2014 at 01:54 UTC

When you delombok an enum, the resulting source code contains indented blank lines regardless of the value of the emptyLines format setting. For example, delomboking the following source

import lombok.RequiredArgsConstructor;

@ RequiredArgsConstructor
public enum Test {

private final int foo;


with Lombok 1.12.4 with -f emptyLines:blank results in this (output run through sed -e's/ /_/g' to make problem more obvious):



____@ java.lang.SuppressWarnings("all")

This bug's the definition of "trivial" (come to think of it, I'm not entirely sure how I came across it in the first place), but it'd be nice to have the setting respected here.


👤 r.spilker   🕗 Jan 19, 2014 at 05:51 UTC

Looking at the code, the cause is that printEnumBody prints its own statements, and should contain in the second loop the same check as printStats:

if (!suppressAlignmentForEmptyLines(l.head)) align();

👤 r.spilker   🕗 Jan 19, 2014 at 20:55 UTC

Fixed. You can already try it out using the latest edge release:


End of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment