import lombok.Getter;
public class test {
@Getter
public static @Deprecated long value = 0;
}
After invocation of delombok it becomes:
public class test {
@Deprecated
public static long value = 0;
@java.lang.Deprecated
@java.lang.SuppressWarnings("all")
public static long getValue() {
return test.value;
}
}
I would have expected:
public class test {
public static @Deprecated long value = 0;
@java.lang.Deprecated
@java.lang.SuppressWarnings("all")
public static long getValue() {
return test.value;
}
}
For some things it makes a difference, such as the https://checkerframework.org, which will complain [type.anno.before.modifier] write type annotation @s() immediately before type, after modifiers [public] if the annotations are moved.
I recommend opening a case directly with Project Lombok, not its Maven Plugin, since this plugin is simply wrapping the underlying delombok command to work with Maven.
Take this simple test class:
After invocation of delombok it becomes:
I would have expected:
For some things it makes a difference, such as the https://checkerframework.org, which will complain
[type.anno.before.modifier] write type annotation @s() immediately before type, after modifiers [public]
if the annotations are moved.and this basic maven pom: