NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Maven Central · #706 by repository stars
Spice up your java: Automatic Resource Management, automatic generation of getters, setters, equals, hashCode and toString, and more!
Last release 1 months ago
02 Sep 2026
Ships fairly regularly
a new release about every 4 months
Nearly every release is documented
notes for 58 of 58 stable releases
Nothing withdrawn
no release was ever pulled
16 years old
60 releases · first in 2011
BREAKING CHANGE/BUGFIX: @Builder(builderClassName = "Builder") now generates an error, because the type names collide. #3857 (found after release)
@Builder(builderClassName = "Builder") now generates an error, because the type names collide. #3857 (found after release)@SneakyThrows usage on JDK26 no longer results in class files that require lombok.jar to be on the runtime classpath (which should not be neccessary). #4040.lombok.checkReturnValueAnnotation (values: none, lombok; default: none) lets lombok generate @lombok.CheckReturnValue on generated methods where the return value should not be ignored, such as @With methods and @Builder.build(). A future lombok release may flip the default to lombok. #4013.@SuperBuilder has been promoted to the main package. Otherwise, no changes have been made to the annotation. The old experimental annotation will remain for a few versions, at which point it will be marked as a deprecated annotation. Eventually it'll be removed. If you had lombok.config configuration for this annotation, the configuration keys for this feature have been renamed. #2209.lombok.experimental.Wither and lombok.Delegate are deprecated remnants; these features were moved (to respectively lombok.With and lombok.experimental.Delegate over 5 years ago. They are now removed entirely. If your project is dependent on an older version of lombok which still has those; fret not, lombok still processes these annotations. It just no longer includes them in the jar.@SideEffectFree to constructors it makes if you have enabled checker framework via lombok.config.@SideEffectFree to the build() method of any generated builder, even if it is a builder for invoking a method; in that case, the side-effect-free nature of build() mirrors the side-effect-free nature of the method invocation you've built. Lombok now checks if the method it generated a builder for is side effect free / 'check return type'.One column per quarter.
[build] lombok's launcher is still intended to be 1.4 compatible, or …
[build] lombok's launcher is still intended to be 1.4 compatible, or …
@Jacksonized no longer stops generating @JsonProperty once an explicit @JsonIgnore annotations is encountered #4022.@Jacksonized and fluent = true no longer causes the error com.fasterxml.jackson.annotation.JsonProperty is not a repeatable annotation interface. #3934.[version] pre-release version bump
[version] pre-release version bump
@Jacksonized now supports both Jackson2 and Jackson3; you'll get a warning until you configure which one (or even both!) you want lombok to generate. #3950.val and @ExtensionMethod could sometimes cause erroneous errors (in that you see errors but compilation succeeds anyway) using javac. #3947.@Jacksonized + fields marked transient would result in those transient fields being serialised which is surprising (and thus undesired) behaviour. #3936.FEATURE: All the various @Log annotations now allow you to change their access level (they still default to private). #2280. Thanks to new contributor
IMPROBABLE BREAKING CHANGE: From versions 1.18.16 to 1.18.38, lombok automatically copies certain Jackson annotations (e.g., @JsonProperty) from field…
java.lang.IllegalArgumentException: Document does not match the AST. Issue #3886.@ExtensionMethod is now significantly faster Issue #3866.config tool would emit incorrect output for nullity annotations. Issue #3931.@Jacksonized @Accessors(fluent=true) automatically creates the relevant annotations such that Jackson correctly identifies fluent accessors. Issue #3265, Issue #3270.@JsonProperty) from fields to the corresponding accessors (getters/setters). However, it turned out to be harmful in certain situations. Thus, Lombok does not automatically copy those annotations any more. You can restore the old behavior using the config key lombok.copyJacksonAnnotationsToAccessors = true.FEATURE: Lombok's nullity annotation now supports JSpecify out of the box, using config key jspecify.
jspecify.BUGFIX: Eclipse projects using the com.pro-crafting.tools:jasperreports-maven-plugin will now compile.
com.pro-crafting.tools:jasperreports-maven-plugin will now compile.[release] pre-release version bump
[release] pre-release version bump
NoSuchMethodError traces in your logs if using @Builder or @Singular prior to this fix. Issue #3638.@lombok.Generated by default to methods and types it generates. This may result in accidentally increasing your test coverage percentage. Issue #3667.lombok.config contains lombok.onX.flagUsage = WARNING, from now on warnings will actually be generated if onX is used.Issue #2848@SuperBuilder was used on a type with an generic array type, it would error wrong number of type arguments. Issue #3694.[release] pre-release version bump
[release] pre-release version bump
java.lang.NoSuchMethodError: 'java.lang.StringBuffer org.eclipse.jdt…. Issue #3564.@Locked has been introduced. Like @Synchronized but with java.util.concurrent.locks locks instead of the synchronized primitive. Thanks, Pim van der Loos for the PR! Issue #3506.@Getter instead of the actual field's name. Issue #562. This issue is almost old enough to drink. Points for dedication go to Rawi for fixing this one.@SuperBuilder was used on a type with an annotated generic type, it would error wrong number of type arguments. Issue #3592.@ExtensionMethod. Issue #3225.@Getter(lazy=true) would fail if the expression contained a variable called value. Issue #2917.static. Issue #3497 Issue #3559.com.pro-crafting.tools:jasperreports-plugin will now compile.@FieldNameConstants now works when generated fields are involved. Issue #3529.org.jspecify.nullness to org.jspecify.annotations, which might lead to a different null analysis. Issue #3608.PLATFORM: Initial JDK21 support added. Issue #3393.
@Helper class directly in a method (and not nested more deeply) wouldn't work. Issue #3370.Package org.objectweb.asm in both module lombok and module org.objectweb.asm. Issue #3474.records. Issue #3315.@lombok.Singular in it wouldn't remove that annotation. Issue #1377.void ext(long arg) with an int) would fail at runtime. Issue #3463.@Getter(lazy=true) with complicated initialization expressions would fail on javac. Issue #3314.module-info.java based project would fail with a SurefireBooterForkException. Issue #3474.PLATFORM: JDK20 support added. Issue #3353.
lombok.config. Issue #3332.@NonNull on a primitive array field on a record wouldn't work. Issue #3366.jakarta.annotation.Nonnull) which we now support. Issue #3346.@ExtensionMethod) in "find references" nor rename-refactoring. Issue #3373PLATFORM: JDK19 support added. Issue #3264.
@(Super)Builder-marked file in eclipse or VSCode would cause issues. Issue #3181.val together with any call to a method that explicitly resolves to a default impl in an interface didn't work in javac. Issue #3242.SECURITY: A widely reported security issue with log4j2 (CVE-2021-44228) has absolutely no effect on either lombok itself nor does usage of lombok on i…
@ToString has an annotation parameter called onlyExplicitlyIncluded. There's now a config key lombok.toString.onlyExplicitlyIncluded to set this property as well. Issue #2849.uShape into a getter is tricky: getUShape or getuShape? The community is split on which style to use. Lombok does getUShape, but if you prefer the getuShape style, add to lombok.config: lombok.accessors.capitalization = beanspec. Issue #2693 Pull Request #2996. Thanks @YonathanSherwin!@Accessors(makeFinal = true) to make final getters, setters, and with-ers. Issue #1456.@UtilityClass classes were broken in JDK9+. Issue #3097.@Builder.Default in it would generate different code vs lombok itself. Issue #3053.@NonNullByDefault and lombok.addNullAnnotations would generate two @Nullable annotations and thus generate a compiler error. Issue #3120. Thanks @JohnPaulTaylorII!VerifyError would show up in the latest eclipse release when using various refactor scripts. Issue #3134.@Log annotations can now be placed on inner enums and records. Issue #2990.@Log4j2, cause any issues whatsoever: You have to ship your own log4j2 dependency in your app - update that to 2.17 or otherwise mitigate this issue (see the CVE page). To avoid unnecessary warnings from dependency checkers, our dep on log4j2, which is used solely for testing, isn't shipped by us, and cannot be exploited in any way, has been updated to 2.17.1. Issue #3063IMPROBABLE BREAKING CHANGE: If the underlying compiler and --release / --source option is 10 or higher, lombok's val is now replaced by final var. Tha…
@StandardException feature. Pull Request #2702.--release / --source option is 10 or higher, lombok's val is now replaced by final var. That means compound declarations such as val x = 10, y = 12; now fail (lombok's old val implementation supported it, javac's var does not), but IDE support in particular is more reliable. We decided it was worth the tradeoff.lombok.val import. Issue #2972.PLATFORM: JDK16 support added. Issue #2681.
@NonNull to have lombok add null checks to your compact constructor (which will be created if need be).@ExtensionMethod did not work. Issue #2741. (by @Rawi01).@SuperBuilder with an existing constructor caused issues in eclipse. Issue #2704. (by @JanRieke).@SuperBuilder with a handwritten builder class caused issues. Issue #2701. (by @JanRieke).IllegalArgumentException if using the MissingSummary bug pattern. Issue #2730.BUGFIX: Various tools using ecj under the hood (including intellij) could cause corrupt class files to be generated. PR #2637, lombok-intellij-plugin
@ExtensionMethod support in ecj improved when generics are involved. Issue #2648, PR #2658 thanks to @Rawi01.lombok.config files when compiling with sbt 1.4 now works again. Issue #2645BREAKING CHANGE: mapstruct users should now add a dependency to lombok-mapstruct-binding. This solves compiling modules with lombok (and mapstruct).
@Builder, you can now configure a @SuperBuilder's 'setter' prefixes via @SuperBuilder(setterPrefix = "set") for example. We still discourage doing this. Pull Request #2357.@Synchronized("lockVar"), if lockVar is referring to a static field, the code lombok generates no longer causes a warning about accessing a static entity incorrectly. Issue #678@Jacksonized on a @Builder or @SuperBuilder will configure Jackson to use this builder when deserializing. Pull Request #2387 thanks to @JanRieke. @Jacksonized documentation.@EqualsAndHashCode(cacheStrategy = EqualsAndHashCode.CacheStrategy.LAZY). Issue #784 Pull Request #2513 thanks to @andrebrait.@Include(rank=n). Pull Request #2485, Issue #1543this parameter. Issue #2444val in combination with values whose generics include wildcards that reference themselves would cause a StackOverflowError in javac. Issue #2358.@SuperBuilder on a class that has some fairly convoluted generics usage would fail with 'Wrong number of type arguments'. Issue #2359 Pull Request #2362@ExtensionMethods with exactly 2 arguments would fail in eclipse. Issue #1441 Pull Request #2376 thanks to @Rawi01.Don't use this version. It is broken. Changes are listed under 1.18.16
IMPROBABLE BREAKING CHANGE: Lombok now generates qualified types (so, Outer.Inner instead of just Inner) in most type signatures that it generates; th…
yield in switch expressions, as well as delombok having a nicer style for arrow-style switch blocks, and text blocks).pattern match instanceof expressions).lombok.config it is possible to import other config files, even from a .zip or .jar.@Builder(setterPrefix = "set") for example. We discourage doing this, but if some library you use requires them, have at it. Pull Request #2174, Issue #1805.@Builder's @Singular, a plural form is also generated, which has the effect of adding all elements in the passed collection. If you pass a null reference, this would result in a message-less NullPointerException. Now, it results in that exception but with a useful message attached (uses the same config as @NonNull), or alternatively via a parameter on @Singular, you can choose to ignore such a call (add nothing, return immediately); this can be useful when deserializing (e.g. Jackson JSON) and JPA/Hibernate code. Issue #2221. singular documentation.@javax.annotation.ParametersAreNonnullByDefault or @org.eclipse.jdt.annotation.NonNullByDefault because then the equals method that lombok generates isn't valid? Fret no more; lombok can now add nullity annotations where relevant. Set the flavour of nullity annotation you prefer in your lombok.config. Applies to the return value of toString, withX, chainable setX, static constructors, build, builder, etcetera, and the parameter of equals, canEqual, and the plural form of @Singular marked fields for builder classes. Issue #788lombok.experimental.Wither has been deprecated (it has been renamed to lombok.With). However, the intent is that lombok still handles the old annotation in case you haven't updated your lombok dep yet. However, only a star import on lombok.experimental.* worked; an explicit one would cause lombok to not generate any with method. Issue #2235@SuperBuilder would cause the error wrong number of type arguments; required 3 Issue #2262; fixed by github user @Lekanich - thank you!@Builder did not include this. prefixes when accessing fields. While semantically it didn't matter, if you use the 'add this prefix for field accesses' save action in eclipse, the save action would break. Issue #2327@return this line if lombok copies the javadoc to a generated setter that is chainable (returns itself). It didn't do that when generating the 'setters' in a @Builder. Lombok also didn't generate an appropriate @return item for @With methods. The javadoc has also been updated slightly (the this reference in the javadoc is now rendered in a code tag).Issue #2323Outer.Inner instead of just Inner) in most type signatures that it generates; this should avoid exotic scenarios where the types lombok puts in signatures end up referring to unintended other types, which can occur if your class implements an interface that itself defines a type with the same name as one defined in your source file. I told you it was exotic. Thanks to Hunter Anderson for doing some preliminary work on this change. Issue #2268java -jar lombok.jar config -v <files> no longer shows which files do not mention the specified keys. Use --non-mentioned or -n to show them anyway.IMPROBABLE BREAKING CHANGE: Stricter validation of configuration keys dealing with identifiers and types (lombok.log.fieldName, lombok.fieldNameConsta…
@Wither has been promoted to the main package, renamed to @With. Otherwise, no changes have been made to the annotation. The old experimental annotation will remain for a few versions as a deprecated annotation. If you had lombok.config configuration for this annotation, the configuration keys for this feature have been renamed.@CustomLog annotation in combination with the lombok.log.custom.declaration configuration key. See the log documentation for more information. Pullrequest #2086 with thanks to Adam Juraszek.staticConstructor will now also be generated if a (private) constructor already exists. Issue #2100val is now capable of decoding the type of convoluted expressions (particularly if the right hand side involves lambdas and conditional (ternary) expressions). Pull Request #2109 with thanks to Alexander Bulgakov.lombok.builder.className. See the Builder documentation and SuperBuilder documentation@NonNullByDefault, with lombok's @NonNull, you get a bunch of warnings about dead code that are inappropriate. These warnings are now suppressed, thanks to a contribution from Till Brychcy! Pull Request #2155@NonNull can now also generate checks using jdk's Objects.requireNonNull or Guava's Preconditions.checkNotNull. Issue #1197build()). This experiment can be turned on by adding checkerframework = true to your lombok.config file.@JsonProperty or @JsonValue on a field in combination with @Setter or @Data would sometimes throw a ClassCastException during compilation. Issue #2156List<byte[]>... in a method parameter to List<byte...>... Issue #2140@Singular builder entry would produce a cascade of error dialogs. Issue #2169lombok.log.fieldName, lombok.fieldNameConstants.innerTypeName, lombok.copyableAnnotations).@Builder on a class with fields marked @Default) now have $value as the name; direct manipulation of these fields is not advised because there is an associated $set variable that also needs to be taken into account. Issue #2115IMPROBABLE BREAKING CHANGE: For fields and parameters marked non-null, if the method body starts with an assert statement to ensure the value isn't nu…
@FieldNameConstants to CONSTANT_CASE the generated constants, using a lombok.config option. See the FieldNameConstants documentation. Issue #2092.builder method when using @Builder; usually because you're only interested in the toBuilder method. As a convenience we won't emit warnings about missing @Builder.Default annotations when you do this. Issue #2046@NonNull, or any other annotation that would result in a null-check, you can configure to generate an assert statement instead. Issue #2078.@com.fasterxml.jackson.annotation.JsonProperty and will copy it to the right places for example when making builders. Issue #1961 Issue #1981var as var and not as the actual underlying type. Issue #2049@Builder and manually write the build() method in your builder class, javac would error out instead of deferring to your implementation. Issue #2050 Issue #2061@SuperBuilder together with @Singular on non-lists would produce an erroneous emptyList call. Issue #2104.ecj to compile java code with @Builder or @SuperBuilder in it, and a builder setter method was generated for a @NonNull-marked method, no explicit null check would be present. However, running javac on the exact same file would produce the null check. Now ecj also produces this null check. Issue #2120.@NonNull marked parameters. Issue #2122FEATURE: Javadoc on fields will now also be copied to the Builders' setters. Thanks for the contribution, Emil Lundberg. Issue #2008
@FieldNameConstants feature now allows you to write the inner type by hand and add whatever you like to it; lombok will add the constants to this class. See the updated FieldNameConstants feature page.lombok.config key to configure @ToString's call super behavior; it's just like @EqualsAndHashCode which has had it for a while now. Issue #1918@Delegate in combination @NonNull would give an error in jdk8. Issue #1935@FieldNameConstants in eclipse would cause errors in the error log view, and error popups if save actions are turned on. Issue #2024NoClassDefFoundError. Issue #1932@Setter and @Wither on the same field, when that field also has javadoc with a --setter-- section or an @param tag, resulted in a race condition where the first handler to get to the field would take that part of the javadoc. This is a step along the way to fixing Issue #1033BREAKING CHANGE: The @FieldNameConstants feature has been completely redesigned. Issue #1774 FieldNameConstants documentation
@FieldNameConstants feature has been completely redesigned. Issue #1774 FieldNameConstants documentation@NonNull style annotations from various libraries), as well as any annotations you explicitly list in the lombok.copyableAnnotations config key in your lombok.config file. Also, lombok is more consistent about copying these annotations. (Previous behaviour: Lombok used to copy any annotation whose simple name was NonNull, Nullable, or CheckForNull). Issue #1570 and Issue #1634@NonNull annotation can now be used on type usages (annotation on type usages has been introduced in JDK 8). @Builder's @Singular annotation now properly deals with annotations on the generics type on the collection: @Singular List<@NonNull String> names; now does the right thing.@SuperBuilder and toBuilder, and toBuilder no longer throws NullPointerException if a @Singular-marked collection field is null. Issue #1324--module-path option, and will automatically add lombok itself to the module path. This should make it possible to delombok your modularized projects. Issue #1848@args.txt to delombok to read args from the text file; useful if you have really long classpaths you need to pass to delombok. Issue #1795@NoArgsConstructor(force=true) would try to initialize already initialized final fields in Eclipse. Issue #1829module-info.java-style) code, if the module name has dots in it, it wouldn't work. Issue #1808org.mapstruct.ap.spi when trying to use lombok in jigsaw-mode on JDK 11. Issue #1806BUGFIX: mapstruct + lombok in eclipse should hopefully work again. Issue #1359 and mapstruct issue #1159
lombok.var. Issue #1783@SuperBuilder annotation. Thanks for the contribution, Jan Rieke. @SuperBuilder documentation@NoArgsConstructor, including forcing one with lombok.config: lombok.noArgsConstructor.extraPrivate=true now take any defaults set with @Builder.Default into account. Issue #1347BREAKING CHANGE: The in 1.16.22 introduced configuration key lombok.noArgsConstructor.extraPrivate is now false by default. Issue #1708
lombok.noArgsConstructor.extraPrivate is now false by default. Issue #1708@Flogger. Issue #1697@FieldNameConstants has been extended to support prefixes and suffixes. By default, the generated constants are prefixed with FIELD_. Docs on @FieldNameConstants.The 'old' experimental one is still around but is deprecated, and is an alias for the new main package one. var documentation.
@Data and @Value to enable deserialization frameworks (like Jackson) to operate out-of-the-box. Use lombok.noArgsConstructor.extraPrivate = false to disable this behavior.toString, equals, and hashCode generation. There is a new mechanism to mark which fields (and now, methods) are to be included or excluded for the generation of these methods: mark the relevant member with for example @ToString.Include or @EqualsAndHashCode.Exclude. ToString documentation EqualsAndHashCode documentation@Getter and @Setter also allow onMethod and onParam when put on a type. Issue #1653@FieldNameConstants is a new feature that generates string constants for your field names. Docs on @FieldNameConstants.module-info.java feature. Issue #985var has been promoted from experimental to the main package with no changes. The 'old' experimental one is still around but is deprecated, and is an alias for the new main package one. var documentation.lombok.experimental.Builder and lombok.experimental.Value are deprecated remnants of when these features were still in experimental. They are now removed entirely. If your project is dependent on an older version of lombok which still has those; fret not, lombok still processes these annotations. It just no longer includes them in the jar.BREAKING CHANGE: _lombok config_ key lombok.addJavaxGeneratedAnnotation now defaults to false instead of true. Oracle broke this annotation with the r…
lombok.addJavaxGeneratedAnnotation now defaults to false instead of true. Oracle broke this annotation with the release of JDK9, necessitating this breaking change.lombok.anyConstructor.suppressConstructorProperties is now deprecated and defaults to true, that is, by default lombok no longer automatically generates @ConstructorProperties annotations. New config key lombok.anyConstructor.addConstructorProperties now exists; set it to true if you want the old behavior. Oracle more or less broke this annotation with the release of JDK9, necessitating this breaking change.callSuper=true,of={}. Issue #1505delombok no longer prints the synthetic outer-class parameter. Issue #1521eclipse.ini and friends, instead of a relative path. If you want the old behavior, you can use java -jar -Dlombok.installer.fullpath=false lombok.jar.PLATFORM: JDK9 support much improved since v1.16.16; Issue #985
BUGFIX: @Builder now marks generated builder 'setters' as @Deprecated if the source field is deprecated. Issue #1342
@Builder.Default lets you configure default values for your fields when using @Builder. See the Builder feature page for more information. Issue #1201onX feature (which lets you add annotations to generated methods) did not work if the annotation you added contained named parameters, and you are compiling with JDK8's javac. We can't fix this (it's a bug in javac), but we have provided an alternate, prettier way to do onX on javac8+. Issue #778 onX documentation@Data and @Value now respect the configuration for field access when generating equals, hashCode and toString. Issue #1329@Builder now marks generated builder 'setters' as @Deprecated if the source field is deprecated. Issue #1342@ConstructorProperties will now also be generated for private and package private constructors. This is useful for Jackson Issue #1180DEPRECATION: The configuration key lombok.addGeneratedAnnotation is now deprecated, use lombok.addJavaxGeneratedAnnotation instead.
@lombok.Generated Issue #1014lombok.addGeneratedAnnotation is now deprecated, use lombok.addJavaxGeneratedAnnotation instead.FEATURE: var is the mutable sister of val. For now experimental, and opt-in using ALLOW in the flagUsage configuration key. Thanks for the contributio
var is the mutable sister of val. For now experimental, and opt-in using ALLOW in the flagUsage configuration key. Thanks for the contribution, Bulgakov Alexander.@Value and @FieldDefaults no longer touch static fields Issue #1254val in lambda expressions now work as expected Issue #911Getter(lazy=true) now emits an error message when used on a transient field Issue #1236FEATURE: Added support for JBoss logger Issue #1103
javac -Xlint:all would generate a warning about unclaimed annotations Issue #1117@Delegate Issue #913PLATFORM: Starting jdk9 support: No more error message regarding pid
pid@Builder updates: It now generates clearFieldName() methods if @Singular is used. Issue #967.@Builder updates: The annotation can now be put on instance methods. Issue #63.@Builder updates: @Singular now supports guava's ImmutableTable Issue #937.lombok.config key can now be used to make your fields final and/or private... everywhere. We'll be monitoring the performance impact of this for a while. We'll touch every source file if you turn these on, and even if you don't, we have to call into the lombok config system for every file.lombok.config key can now be used to set the default behaviour of @EqualsAndHashCode when generating methods for a class that extends something in regards to calling the superclass implementations of equals and hashCode or not. Issue #965.@Wither on abstract classes now generates something slightly more useful: An abstract wither method. Issue #945.@Helper used to only be be legal in pretty specific places; now it works just about everywhere.@NonNull annotations on parameters as lombok feature would not get properly delomboked. Issue #950.@Delegate in javac would generate arrays instead of varargs parameters. Issue #932.@Value and @FieldDefaults no longer make uninitialized static fields final. Issue #928.@Builder.ObtainVia now has @Retention(SOURCE) Issue #986.@NonNull on a parameter of an abstract method no longer generates a warning, to allow you to use this annotation to document intended behaviour Issue #807.FEATURE: @Helper can be placed on method-local inner classes to make all methods in the class accessible to the rest of the method. Full documentation
@Helper can be placed on method-local inner classes to make all methods in the class accessible to the rest of the method. Full documentation.@Builder(toBuilder = true) is now available. It produces an instance method that creates a new builder, initialized with all the values of that instance. For more, read the Feature page on Builder.hashCode() method generated by lombok via @EqualsAndHashCode, @Data, and @Value is now smarter about nulls; they are treated as if they hash to a magic prime instead of 0, which reduces hash collisions.@NoArgsConstructor(force = true) can be used to create no args constructors even if final fields are present.@Builder would produce compiler errors in javac. Issue #828.BUGFIX: Lombok now works with Eclipse Mars.
FEATURE: The config key lombok.extern.findbugs.addSuppressFBWarnings can now be used to add findbugs suppress warnings annotations to all code lombok
lombok.extern.findbugs.addSuppressFBWarnings can now be used to add findbugs suppress warnings annotations to all code lombok generates. This addresses feature request Issue #737.@UtilityClass, for making utility classes (not instantiable, contains only static 'function' methods). See the feature documentation for more information.delombok task was broken starting with v1.16.0. Note that the task def class has been changed; taskdef lombok.delombok.ant.Tasks$Delombok instead of the old lombok.delombok.ant.DelombokTask. Issue #810.val in javac would occasionally fail if used inside inner classes. This is (probably) fixed. Issue #729 and Issue #616.The old one still exists and has been deprecated.
@ExtensionMethod was broken in Eclipse using java 8. Issue #777, Issue #782@Builder has graduated from experimental to the main package with a few changes (addition of @Singular, removal of the fluent and chain options). The old one still exists and has been deprecated.@Builder now supports adding the @Singular annotation to any field/parameter that represents a collection, which results in a method in the generated builder that takes in one element of that collection and adds it. Lombok takes care of generating the appropriate code to produce a compacted immutable version of the appropriate type. In this version, java.util collections and guava's ImmutableCollections are supported. See the feature documentation for more information.-Xbootclasspath to be in your eclipse.ini file, and removes all non-public API and third party dependencies (such as ASM) from the lombok jar, thus removing them from your IDE's auto complete offerings in any project that uses lombok. For those debugging lombok, the launcher enables hot code replace which makes debugging a lot easier, as previously one was required to shut down the IDE, rebuild the jar, and relaunch. Add -Dshadow.override.lombok=/path/to/lombok/bin to the launch target for hot code replace.PERFORMANCE: The configuration system typically hit the filesystem twice per read configuration key instead of hardly ever. This is a continuation of
BUGFIX: Usage of val would break starting with JDK8 release 1.8.0_20. Issue #766
val would break starting with JDK8 release 1.8.0_20. Issue #766BUGFIX: GWT produces errors in handlers on line 1 in any source files that use lombok; this has been fixed. Issue #734
BUGFIX: syntax highlighting in eclipse will become weird and auto-complete may stop working amongst other eclipse features in v1.14.0 (regression from
@Tolerate; put this annotation on any method or constructor and lombok will skip it when considering whether or not to generate a method or constructor. This is useful if the types of the parameters of your method do not clash with what lombok would generate.lombok.getter.noIsPrefix, which lets you disable use and generation of isFoo(), instead going with getFoo(), for {@code boolean} fields.IndexOutOfBound: 2 in ASTConverter.convertType. Issue #721IllegalArgumentException in the log with message "Path must include project and resource name". Also, 'invalid URL' or 'URI not absolute' errors can occur when using exotic file system abstractions such as Jazz. These bugs haven't been fixed, but instead of catastrophic failure, warning logs will be emitted instead. Issue #717DEPRECATION: @Delegate has been moved to lombok.experimental.Delegate, and corner cases such as recursive delegation (delegating a type that itself ha…
java -jar lombok.jar config -gv for the complete list.@Delegate has been moved to lombok.experimental.Delegate, and corner cases such as recursive delegation (delegating a type that itself has fields or methods annotated with @Delegate) are now error conditions. See the feature documentation for more information.@Nullable, on the one parameter of generated equals() methods by specifying the onParam= option on @EqualsAndHashCode, similar to how that feature already exists for @Setter. Issue #709canEqual method generated by @EqualsAndHashCode, @Value and @Data is now protected instead of public. Issue #695@SneakyThrows with a javac from JDK8 with -target 1.8 would result in a post compiler error. Issue #690BUGFIX: Deadlocks would occasionally occur in eclipse during project builds, especially if using the gradle plugin. Issue #680
@Log annotations now support the topic parameter, which sets the logger's name. The default remains the fully qualified type name of the class itself. Issue #667.@SneakyThrows annotated methods Issue #511.@SneakyThrows annotated methods Issue #668.BUGFIX: v1.12.2's delombok turns all operator+assignments into just assignment. Fixed. Issue #633
--format-help for more information. Issue #643PLATFORM: Initial JDK8 support, without affecting existing support for JDK6 and 7. Issue #524. While lombok will now work on JDK8 / javac8, and netbea
@RequiredArgsConstructor(onConstructor=@__(@Inject)). The old way (single underscore) still works, but generates warnings on javac 8.@NonNull on an abstract method used to cause exceptions during compilation. Issue #594.@NonNull on methods that also have @SneakyThrows or @Synchronized caused arbitrary behaviour. Issue #623.The 'old' experimental one is still around but is deprecated, and is an alias for the new main package one. @Value documentation.
@param and @return are handled appropriately. Addresses feature request Issue #132. @Getter and @Setter documentation. @Wither documentation.@Value has been promoted from experimental to the main package with no changes. The 'old' experimental one is still around but is deprecated, and is an alias for the new main package one. @Value documentation.@Builder support. One of our earliest feature request issues, Issue #89, has finally been addressed. @Builder documentation.@NonNull on a method or constructor parameter now generates a null-check statement at the start of your method. This nullcheck will throw a NullPointerException with the name of the parameter as the message. Issue #549Lombok.sneakyThrow() or @SneakyThrows would sometimes result in invalid classes (classes which fail with VerifyError). Issue #543val in try-with-resources did not work for javac. Issue #555@Data, warnings are not generated if certain aspects are not generated because you wrote explicit versions of them. However, this gets confusing with equals / hashCode / canEqual, as nothing is generated if any one of those methods is present. Now, if one of equals or hashCode is present but not the other one (or canEqual is present but equals and/or hashCode is missing), a warning is emitted to explain that lombok will not generate any of the equals / hashCode methods, and that you should either write them all yourself or remove them all. Issue #548…will be removed without a reasonable period of deprecation. Documentation on the onX feature
@Value feature no longer implies the also experimental @Wither. If you like your @Value classes to make withers, add @Wither to the class right next to @Value.onMethod, onConstructor and onParam to @Getter, @Setter, @Wither, and @XArgsConstructor. These parameters allow you to add annotations to the methods/constructors that lombok will generate. This is a workaround feature: The stability of the feature on future versions of javac is not guaranteed, and if a better way to implement this feature is found, this feature's current incarnation will be removed without a reasonable period of deprecation. Documentation on the onX feature@Log4j2 Issue #505@ExtensionMethods no longer causes VerifyError exceptions when running eclipse-compiled code if extension methods are called on expressions which are method calls whose return type is a type variable. For example, someList.get(i).extensionMethod() would fail that way. Issue #509BUGFIX: @Deprecated on a field that gets a generated setter in eclipse would result in IllegalArgumentException, which you wouldn't see unless you hav…
-Dlombok.disable. This might be useful for code style checkers and such.@Delegate.NullPointerException in lombok.​javac.​handlers.​JavacHandlerUtil.​upToTypeNode​(JavacHandlerUtil.java:978) when compiling with @ExtensionMethod in javac and generated constructors are involved. Issue #496@Deprecated on a field that gets a generated setter in eclipse would result in IllegalArgumentException, which you wouldn't see unless you have the error log open. If you have save actions defined, you'd get a popup box with the exception. Now fixed. Issue #481FEATURE: {Experimental} @Value, @Wither and @FieldDefaults are now available. These are a lot like @Data but geared towards immutable classes. Documen
@Value, @Wither and @FieldDefaults are now available. These are a lot like @Data but geared towards immutable classes. Documentation on @Value, Documentation on @Wither and Documentation on @FieldDefaults.@ExtensionMethod. Issue #463@Cleanup and @Synchronized cause far fewer issues in the netbeans editor. Issue #466@ExtensionMethod had all sorts of issues in javac. Issue #472Class<T>, caused errors. Issue #469@ExtensionMethod issues in eclipse, such as the ability to call extension methods on a super reference which is now no longer possible. Issue #479FEATURE: {Experimental} @ExtensionMethod is now available to add extensions to any type in the form of static methods that take as first parameter an
@ExtensionMethod is now available to add extensions to
any type in the form of static methods that take as first parameter an object of that type. Documentation on @ExtensionMethodequals and hashCode. Issue #439val in an enhanced for loop did not work if the iterable was a raw type.@Getter(lazy=true) when the data type is boolean, int, array, or some other type that requires special treatment for hashCode/equals, now works properly with @Data, @EqualsHashCode and @ToString. Issue #449SneakyThrows in constructor should not wrap this/super call in try-block Issue #454BUGFIX: @Getter and @Setter now generate deprecated methods for deprecated fields. Fixes Issue #415
fieldName as methodname instead of getFieldName), setters that return this instead of void, and support for fields with prefixes is introduced with this lombok version. Also, the number of parameters of any existing methods with the same name that lombok would generate are now taken into account; previously if you had any method named setX regardless of how many parameters it has, lombok would avoid generating a setX method. Now lombok generates the method if all present setX methods have a number of parameters other than 1. documentation.@Delegate and @Getter or @Data will now delegate to the result of a generated getter. Issue #401java -jar lombok.jar publicApi and including the generated jar in your project. Documentation on using lombok for android development.@Delegate would generate a method with type parameters of the type T extends package.Class, a dot would be prepended to the type name. Issue #414val with a type like Outer<TypeArgs>.Inner now works. Issue #416@Getter(lazy=true) where the variable type is a primitive and the initializing expression is of a different primitive type that would type coerce implicitly, i.e. ints can be assigned to longs without a cast, didn't work before. Issue #418val is no longer legal inside basic for loops (the old kind, not the foreach kind). These variables should rarely be final, and in practice it wasn't possible to delombok this code properly. Issue #419FEATURE: @Delegate can now be used on a no-argument method, which works similarly to adding it to fields. See documentation.
@Delegate can now be used on a no-argument method, which works similarly to adding it to fields. See documentation.PERFORMANCE: Performance issues (memory leaks) when using lombok in netbeans, introduced in 0.10, have been fixed. Issue #315
@Data was present. Issue #124@Data was present. Issue #295@Data in certain cases. Issue #374BUGFIX: Using the log field from @Log, etc, now works in static initializers. Issue #368
log field from @Log, etc, now works in static initializers. Issue #368@Setter fields. Issue #336lombok.val would cause NPEs in javac. Issue #372lombok.val out in full (vs. using an import statement) did not work in eclipse. Issue #373BUGFIX: Delombok will no longer jumble up comments from different files when using -sourcepath option. Issue #357
@NotNull as an annotation that indicates lombok should generate nullcheck guards causes all sorts of problems. This has been removed again, and documentation has been updated to reflect this. Issue #360@EqualsAndHashCode or @Data did not work on non-static inner classes whose outer class has a type variable. It does now. Issue #362BUGFIX: @Delegate in eclipse could cause memory leaks in 0.10.0. Issue #337
@Delegate in eclipse could cause memory leaks in 0.10.0. Issue #337@AllArgsConstructor was erroneously generating a parameter and an assignment for final variables already assigned in their declaration. Issue #351@NotNull is now also recognized as an annotation indicating that lombok should generate nullcheck guards in generated constructors and setters. Issue #344FEATURE: New annotation: @Delegate. This annotation lets lombok generate delegation methods for a given field. More…
@Log, @Slf4j, etc. annotation. More…@SneakyThrows no longer requires a runtime dependency on lombok.jar. In fact, any call to Lombok.sneakyThrows(ex) is optimized at the bytecode level and no longer requires you to actually have lombok.jar or lombok-runtime.jar on the classpath.isFoo or hasFoo. Now the setter generated for this will be called setFoo (as the property name is foo) and not setIsFoo. Also, hasFoo is now no longer special; the names would be isHasFoo and setHasFoo. The java bean spec does not give has special meaning.@EqualsAndHashCode (and by extension, @Data) now add a canEqual method which improves the sanity of equality amongst a hierarchy of classes. More…@Getter now supports a lazy=true attribute. More…@Cleanup Issue #227NullPointerException in Eclipse on the getTypeBinding method in the error log has been fixed. Issue #237@Setter and @Getter can now be applied to static fields again (was broken in v0.9.3 only). Issue #209equals, hashCode and canEqual will be generated. Issue #313Nothing published for this version
Nothing published for this version
FEATURE: Adding @Getter or @Setter to a class is now legal and is like adding those annotations to every non-static field in it. Issue #202
@Getter or @Setter to a class is now legal and is like adding those annotations to every non-static field in it. Issue #202@NoArgsConstructor, @RequiredArgsConstructor and @AllArgsConstructor have been added. These split off @Data's ability to generate constructors, and also allow you to finetune what kind of constructor you want. In addition, by using these annotations, you can force generation of constructors even if you have your own. Issue #152@java.beans.ConstructorProperties annotation. This does mean these constructors no longer work in java 1.5, as this is a java 1.6 feature. The annotation can be suppressed by setting suppressConstructorProperties to true in a @RequiredArgsConstructor or @AllArgsConstructor annotation. Issue #195toString, equals and hashCode methods will now use this.getX() and other.getX() instead of this.x and other.x if a suitable getter is available. This behaviour is useful for proxied classes, such as the POJOs that hibernate makes. Usage of the getters can be suppressed with @ToString/@EqualsAndHashCode(doNotUseGetters = true). Issue #183@CheckForNull is now copied from a field to a setter's parameter and the getter method just like @Nullable. Issue #201@SneakyThrows: Resolving types in annotations now works better especially for classes that aren't in the core java libraries. Issue #161tools.jar isn't found (required when running delombok), now a useful error message is generated. The search for tools.jar now also looks in JAVA_HOME.Outer.Inner instead of just Inner. Issue #206this.fieldName). For those who have a warning configured for unqualified field access, those should no longer occur. Issue #121@SuppressWarnings("all") attached to avoid such warnings as missing javadoc, for those of you who have that warning enabled. Issue #120@Data and other annotations now don't throw errors when you include fields with bounded wildcard generics, such as List<? extends Number>. Issue #157import lombok.AccessLevel;. In netbeans, that import will no longer be flagged erroneously as being unused. Issue #173 and Issue #176import lombok.*; is supposed to work in the vast majority of cases. In eclipse, however, it didn't. Now it does. Issue #175@Getter or @Setter is applied to a multiple field declaration, such as @Getter int x, y;, the annotation now applies to all fields, not just the first. Issue #127<?> style wildcards anywhere in the source, as well as at least 1 lombok annotation. No longer. Issue #207Your coding agent can read these notes before it upgrades. Set up the MCP server →