aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2016-12-05 22:23:39 +0100
committerRoel Spilker <r.spilker@gmail.com>2016-12-05 22:23:39 +0100
commit0727c8bfd305408074d908dc4f8c31c0bff54789 (patch)
treeae7308e54bfb75eb22c1cc9c1d9beebea0005b29 /test/transform
parent7969951125db42a84fbdd46d4a5fb804842e00f9 (diff)
downloadlombok-0727c8bfd305408074d908dc4f8c31c0bff54789.tar.gz
lombok-0727c8bfd305408074d908dc4f8c31c0bff54789.tar.bz2
lombok-0727c8bfd305408074d908dc4f8c31c0bff54789.zip
Fixes #1254: Value and FieldDefaults should skip static fields
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/FieldDefaults.java2
-rw-r--r--test/transform/resource/after-delombok/ValueStaticField.java4
-rw-r--r--test/transform/resource/after-ecj/FieldDefaults.java6
-rw-r--r--test/transform/resource/after-ecj/ValueStaticField.java4
-rw-r--r--test/transform/resource/before/FieldDefaults.java2
5 files changed, 14 insertions, 4 deletions
diff --git a/test/transform/resource/after-delombok/FieldDefaults.java b/test/transform/resource/after-delombok/FieldDefaults.java
index 8a84f442..6f866a9a 100644
--- a/test/transform/resource/after-delombok/FieldDefaults.java
+++ b/test/transform/resource/after-delombok/FieldDefaults.java
@@ -1,4 +1,5 @@
class FieldDefaults1 {
+ static int STATIC = 3;
final int x;
int y;
FieldDefaults1(int x) {
@@ -6,6 +7,7 @@ class FieldDefaults1 {
}
}
class FieldDefaults2 {
+ static int STATIC = 3;
int x;
private int y;
} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/ValueStaticField.java b/test/transform/resource/after-delombok/ValueStaticField.java
index cec136f4..b4d60724 100644
--- a/test/transform/resource/after-delombok/ValueStaticField.java
+++ b/test/transform/resource/after-delombok/ValueStaticField.java
@@ -1,6 +1,6 @@
final class ValueStaticField {
- private static int x;
- private static final String PASSWORD = "Ken sent me";
+ static int x;
+ static String PASSWORD = "Ken sent me";
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ValueStaticField() {
diff --git a/test/transform/resource/after-ecj/FieldDefaults.java b/test/transform/resource/after-ecj/FieldDefaults.java
index e76c1251..a6941b7b 100644
--- a/test/transform/resource/after-ecj/FieldDefaults.java
+++ b/test/transform/resource/after-ecj/FieldDefaults.java
@@ -1,14 +1,20 @@
@lombok.experimental.FieldDefaults(makeFinal = true) class FieldDefaults1 {
+ static int STATIC = 3;
final int x;
@lombok.experimental.NonFinal int y;
+ <clinit>() {
+ }
FieldDefaults1(int x) {
super();
this.x = x;
}
}
@lombok.experimental.FieldDefaults(level = lombok.AccessLevel.PRIVATE) class FieldDefaults2 {
+ static int STATIC = 3;
@lombok.experimental.PackagePrivate int x;
private int y;
+ <clinit>() {
+ }
FieldDefaults2() {
super();
}
diff --git a/test/transform/resource/after-ecj/ValueStaticField.java b/test/transform/resource/after-ecj/ValueStaticField.java
index 4ce84a02..75e337ce 100644
--- a/test/transform/resource/after-ecj/ValueStaticField.java
+++ b/test/transform/resource/after-ecj/ValueStaticField.java
@@ -1,7 +1,7 @@
import lombok.Value;
final @Value class ValueStaticField {
- private static int x;
- private static final String PASSWORD = "Ken sent me";
+ static int x;
+ static 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) {
diff --git a/test/transform/resource/before/FieldDefaults.java b/test/transform/resource/before/FieldDefaults.java
index ffe89734..97389411 100644
--- a/test/transform/resource/before/FieldDefaults.java
+++ b/test/transform/resource/before/FieldDefaults.java
@@ -1,5 +1,6 @@
@lombok.experimental.FieldDefaults(makeFinal = true)
class FieldDefaults1 {
+ static int STATIC = 3;
int x;
@lombok.experimental.NonFinal int y;
@@ -10,6 +11,7 @@ class FieldDefaults1 {
@lombok.experimental.FieldDefaults(level = lombok.AccessLevel.PRIVATE)
class FieldDefaults2 {
+ static int STATIC = 3;
@lombok.experimental.PackagePrivate int x;
int y;
} \ No newline at end of file