Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Builder.Default on primitives marks imports unused in Netbeans 9/10 #2010

Open
xathien opened this issue Jan 10, 2019 · 1 comment
Open

Comments

@xathien
Copy link

xathien commented Jan 10, 2019

Describe the bug
Using @Builder.Default on any primitive field will mark any imports used by any other field as unused.

To Reproduce

import java.util.HashMap;
import java.util.Map;

import lombok.Builder;

@Builder
public class DeleteMe
{
  @Builder.Default
  Map<Object, Object> someMap = new HashMap<>();

  @Builder.Default
  int someInt = 4;
}

This will cause java.util.HashMap to be marked as an unused import. Changing int to Object correctly marks all imports as used.

There are some other effects I'm noticing in my code--such as "cannot find symbol" hints on the class using Builder.Default--but I'm having trouble distilling them into reproduction steps. I'll update this issue if I can find better ways to repro the additional behaviors.

Unused import screenshot:
image

Expected behavior
Don't confuse Netbeans into thinking my imports are unused, especially because I use "Remove unused imports on save". 😆

Version info :

  • Lombok version 1.18.4
  • Platform Java: 11.0.1; Java HotSpot(TM) 64-Bit Server VM 11.0.1+13-LTS, Netbeans 10.0
@rarunkarthik
Copy link

This is causing issues for me on 1.18.12 as well. I tried 1.18.18 as well, still same issue. Do we have an ETA for this resolution?

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

No branches or pull requests

3 participants