@Getter private final Set<Foo.Bar> something; causes Organize Imports error #666

Closed
lombokissues opened this Issue Jul 14, 2015 · 7 comments

Projects

None yet

1 participant

@lombokissues
Collaborator

Migrated from Google Code (issue 631)

@lombokissues
Collaborator

👤 shackman0   🕗 Jan 28, 2014 at 10:48 UTC

What steps will reproduce the problem?

  1. add @ Getter private final Set<Foo.Bar> something; to your java classs
  2. ctrl-shift-o causes an error popup to appear (see attached)

What is the expected output? What do you see instead?
ctrl-shift-o should not error

What version of the product are you using? On what operating system?
win 7, eclipse kepler sr1, lombok 0.12.0

Please provide any additional information below.
f.shackelford@ topdesk.com

@lombokissues
Collaborator

👤 shackman0   🕗 Jan 28, 2014 at 10:48 UTC

@lombokissues
Collaborator

👤 r.spilker   🕗 Feb 04, 2014 at 21:28 UTC

Issue #671 has been merged into this issue.

@lombokissues
Collaborator

👤 r.spilker   🕗 Feb 04, 2014 at 22:33 UTC

Hi Floyd,

Can you please give us the smallest possible, self-contained java file and instructions to reproduce the bug? I know it exists :-) But I can't reproduce it on my machine...

Roel

@lombokissues
Collaborator

👤 r.spilker   🕗 Feb 04, 2014 at 22:56 UTC

I got it. I couldn't reproduce it using Map.Entry, as was suggested on the mailing list. However, the difference turns out to be the generics if Map.Entry. If I use a simpler example, I do get messages in the error log and when refactoring, a popup.

My full code is this:

package foo;

import java.util.Set;

import lombok.Getter;

@ Getter
public class Bar {
int foo;
Set<C.D> values;
}

class C {
static class D{}
}

@lombokissues
Collaborator

👤 r.spilker   🕗 Feb 05, 2014 at 00:10 UTC

Fixed, thanks to the code supplied by Martin Grajcar (great job!). You can download the edge release to test it out: https://projectlombok.org/download-edge.html

@lombokissues lombokissues removed the accepted label Jul 14, 2015
@lombokissues
Collaborator

End of migration

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