lombok-intellij-plugin: IDEA 2019.2 highlights builder() method invocation as an error
Short description
builder() method usage causes a warning message:
Cannot access CustomerDto.CustomerDtoBuilder
Expected behavior
The IDEA warning message should not appear.
Version information
- IDEA Version: IDEA 2019.2 (Ultimate Edition)
- JDK Version: 1.8
- OS Type & Version: Windows 10
- Lombok Plugin Version: 0.25-2019.1
- Lombok Dependency Version: 1.18.8
Steps to reproduce
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder(toBuilder = true)
@FieldDefaults(level = PRIVATE)
public class CustomerDto {
String id;
String firstName;
}

About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 31
- Comments: 34 (4 by maintainers)
Hello everyone! Can you please test this build (Only Intellij 2019.2 and hiher) of plugin: https://github.com/mplushnikov/lombok-intellij-plugin/releases/download/0.26.alpha/lombok-plugin-0.26-2019.2.jar You have to install it manually: Settings->Plugins->Install Plugin from Disk…
It contains some fixes for general caching. Does it fix you issue in your environment?
The problem also goes away if you use @Singular(“foo”) instead of just @Singular on property called “foo”. Its a workaround. The bug is definitely present.
@mplushnikov hey, I just tested it. It looks good. I don’t see this error anymore.
Android Studio 4.1.2 with plugin 0.34-2020.1 occurs. Workaround still is Invalidate Cache and Restart.
Look like the issue is back in 2020.3 with plugin 0.32-EAP. Workaround still is Invalidate Cache and Restart.
There is a bug with plugin. When you add @Singular annotation to Collection field Idea begins to complain on static builder() method. Please fix that. Do I need to create extra issue for this case?
Removing @Singular annotation worked for me. However I do want @Singular annotation in my class. Its a bug in the plugin.
Seemed to work for me as well but the errors are back
Ok, disabling and enabling Lombok Plugin (with IDEA restarts) fixed this problem for me.
I’ve just run Invalidate Cache and Restart and the problem has gone.