mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 22:16:11 +00:00
Added tests to make sure issue 385 is not caused by a simple bug regarding enums
This commit is contained in:
1 parent
5739ffb0d5
commit
eb22b3fe05
3 files changed
+50
No files matched your search
@@ -0,0 +1,18 @@
|
||||
enum GetterEnum {
|
||||
ONE(1, "One");
|
||||
private final int id;
|
||||
private final String name;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private GetterEnum(final int id, final String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE) enum GetterEnum {
|
||||
ONE(1, "One"),
|
||||
private final @Getter int id;
|
||||
private final @Getter String name;
|
||||
<clinit>() {
|
||||
}
|
||||
private @java.lang.SuppressWarnings("all") GetterEnum(final int id, final String name) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") int getId() {
|
||||
return this.id;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") String getName() {
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@RequiredArgsConstructor(access=AccessLevel.PRIVATE)
|
||||
enum GetterEnum {
|
||||
ONE(1, "One")
|
||||
;
|
||||
@Getter private final int id;
|
||||
@Getter private final String name;
|
||||
}
|
||||
Reference in new issue
Block a user