mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 04:15:06 +00:00
[Closes #928] @Value no longer makes uninitialized static fields final
This commit is contained in:
1 parent
1bc73d7703
commit
9fbc226e09
6 files changed
+66
-4
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import lombok.Value;
|
||||
final @Value class ValueStaticField {
|
||||
private static int x;
|
||||
private static final String PASSWORD = "Ken sent me";
|
||||
<clinit>() {
|
||||
}
|
||||
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) {
|
||||
if ((o == this))
|
||||
return true;
|
||||
if ((! (o instanceof ValueStaticField)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() {
|
||||
int result = 1;
|
||||
return result;
|
||||
}
|
||||
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
|
||||
return "ValueStaticField()";
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ValueStaticField() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user