question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@FieldNameConstants Incompatability with lombok 1.18.4

See original GitHub issue

Short description

1.18.4 introduced a breaking change for @FieldNameConstants. Generated fields are no longer prefix + fieldName + suffix and instead are generated as just fieldName inside an inner type.

After delombok i am seeing public static final String nullFIELDnull = "field";

Expected behavior

Generated strings should belong in inner type as

public final class Fields{ public static final String FIELD = "field"; }

See unit test from lombok repo. Before: https://github.com/rzwitserloot/lombok/blob/3d432c38d0cfeb36b8e7402eca56faaafcf7bac7/test/transform/resource/before/FieldNameConstantsBasic.java

After: https://github.com/rzwitserloot/lombok/blob/3d432c38d0cfeb36b8e7402eca56faaafcf7bac7/test/transform/resource/after-delombok/FieldNameConstantsBasic.java

Version information

  • IDEA Version: Build #IU-182.4892.20, built on October 16, 2018

  • JDK Version: JRE: 1.8.0_152-release-1248-b19 amd64

  • OS Type & Version: Windows 7 6.1 *

  • Lombok Plugin Version: 0.22.2018.2

  • Lombok Dependency Version: 1.18.4

Steps to reproduce

What steps do we need to take to reproduce this issue?

Simply use @FieldNameConstants with latest version of lombok.

Sample project

Additional information

Stacktrace

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:22
  • Comments:24 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
mplushnikovcommented, Feb 14, 2019

@vrosenshtein: this change will be available in the next release of plugin (version 0.24)

3reactions
voliveira89commented, Mar 5, 2019

I would appreciate know the release date please 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lombok Changelog
FEATURE: The @FieldNameConstants feature now allows you to write the inner type by hand and add whatever you like to it; lombok will...
Read more >
Lombok not compiling in maven - Stack Overflow
I struggled mightily with this and concluded that Lombok 1.16+ and Java 8 are a problem with earlier versions of Maven's compiler plugin....
Read more >
Lombok - IntelliJ IDEs Plugin - JetBrains Marketplace
IntelliJ Lombok plugin. A plugin that adds first-class support for Project Lombok. Features. @Getter and @Setter. @FieldNameConstants. @ToString.
Read more >
Lombok Maven Plugin – Frequently Asked Questions
Does one need to use the lombok-maven-plugin in order to use lombok in a ... that lombok requires Java 6, so an explicit...
Read more >
Intellij Lombok Plugin Isn'T Compatible - ADocLib
Plugin Compatibility Due to a major internal refactoring, we have made a ... I'm using: Java 11 Lombok 1.18.4 (also tried 1.18.5 edge)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found