aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2015-09-24 00:28:57 +0200
committerRoel Spilker <r.spilker@gmail.com>2015-09-24 00:28:57 +0200
commit9fbc226e090b1ca1efef5e10fd1bd13c4a686cfd (patch)
treec6e2740f8fae81b97629e649459fd7f89deb6863 /test/transform/resource
parent1bc73d770345f480cee9718618e936dd68499e23 (diff)
downloadlombok-9fbc226e090b1ca1efef5e10fd1bd13c4a686cfd.tar.gz
lombok-9fbc226e090b1ca1efef5e10fd1bd13c4a686cfd.tar.bz2
lombok-9fbc226e090b1ca1efef5e10fd1bd13c4a686cfd.zip
[Closes #928] `@Value` no longer makes uninitialized static fields final
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-delombok/ValueStaticField.java29
-rw-r--r--test/transform/resource/after-ecj/ValueStaticField.java24
-rw-r--r--test/transform/resource/before/ValueStaticField.java5
3 files changed, 58 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/ValueStaticField.java b/test/transform/resource/after-delombok/ValueStaticField.java
new file mode 100644
index 00000000..cec136f4
--- /dev/null
+++ b/test/transform/resource/after-delombok/ValueStaticField.java
@@ -0,0 +1,29 @@
+final class ValueStaticField {
+ private static int x;
+ private static final String PASSWORD = "Ken sent me";
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public ValueStaticField() {
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public boolean equals(final java.lang.Object o) {
+ if (o == this) return true;
+ if (!(o instanceof ValueStaticField)) return false;
+ return true;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public int hashCode() {
+ int result = 1;
+ return result;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public java.lang.String toString() {
+ return "ValueStaticField()";
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/ValueStaticField.java b/test/transform/resource/after-ecj/ValueStaticField.java
new file mode 100644
index 00000000..4ce84a02
--- /dev/null
+++ b/test/transform/resource/after-ecj/ValueStaticField.java
@@ -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();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/ValueStaticField.java b/test/transform/resource/before/ValueStaticField.java
new file mode 100644
index 00000000..f731758a
--- /dev/null
+++ b/test/transform/resource/before/ValueStaticField.java
@@ -0,0 +1,5 @@
+import lombok.Value;
+@Value class ValueStaticField {
+ static int x;
+ static String PASSWORD = "Ken sent me";
+}