aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
authorJan Rieke <rieke@subshell.com>2018-09-12 09:30:40 +0200
committerJan Rieke <rieke@subshell.com>2018-09-12 09:30:40 +0200
commitda0020cd48bfd321ec68adc99af7ec46e1551231 (patch)
treec85ff3b3a2bf2ed391bdeda50c349b8831d13e13 /test/transform
parentddd42acb599d45c432a200313a0f403a8a2a3928 (diff)
parent2027ffc49f194da2892938e0cd5868cd286a06f6 (diff)
downloadlombok-da0020cd48bfd321ec68adc99af7ec46e1551231.tar.gz
lombok-da0020cd48bfd321ec68adc99af7ec46e1551231.tar.bz2
lombok-da0020cd48bfd321ec68adc99af7ec46e1551231.zip
Merge remote-tracking branch 'upstream/master' into superToBuilder
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularToBuilderWithNull.java2
-rw-r--r--test/transform/resource/after-delombok/BuilderWithToBuilder.java2
-rw-r--r--test/transform/resource/after-delombok/TypeUseAnnotations.java14
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularToBuilderWithNull.java2
-rw-r--r--test/transform/resource/after-ecj/BuilderWithToBuilder.java2
-rw-r--r--test/transform/resource/after-ecj/TypeUseAnnotations.java15
-rw-r--r--test/transform/resource/before/TypeUseAnnotations.java11
7 files changed, 44 insertions, 4 deletions
diff --git a/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNull.java b/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNull.java
index 1f472438..b0563858 100644
--- a/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNull.java
+++ b/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNull.java
@@ -58,6 +58,6 @@ class BuilderSingularToBuilderWithNull {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularToBuilderWithNullBuilder toBuilder() {
- return new BuilderSingularToBuilderWithNullBuilder().elems(this.elems == null ? java.util.Collections.emptyList() : this.elems);
+ return new BuilderSingularToBuilderWithNullBuilder().elems(this.elems == null ? java.util.Collections.<String>emptyList() : this.elems);
}
}
diff --git a/test/transform/resource/after-delombok/BuilderWithToBuilder.java b/test/transform/resource/after-delombok/BuilderWithToBuilder.java
index b644a16f..8615a40b 100644
--- a/test/transform/resource/after-delombok/BuilderWithToBuilder.java
+++ b/test/transform/resource/after-delombok/BuilderWithToBuilder.java
@@ -86,7 +86,7 @@ class BuilderWithToBuilder<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderWithToBuilderBuilder<T> toBuilder() {
- return new BuilderWithToBuilderBuilder<T>().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.rrr(this)).bars(this.bars == null ? java.util.Collections.emptyList() : this.bars);
+ return new BuilderWithToBuilderBuilder<T>().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.rrr(this)).bars(this.bars == null ? java.util.Collections.<T>emptyList() : this.bars);
}
}
class ConstructorWithToBuilder<T> {
diff --git a/test/transform/resource/after-delombok/TypeUseAnnotations.java b/test/transform/resource/after-delombok/TypeUseAnnotations.java
new file mode 100644
index 00000000..1e1536bf
--- /dev/null
+++ b/test/transform/resource/after-delombok/TypeUseAnnotations.java
@@ -0,0 +1,14 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@interface TA {
+ int x();
+}
+class TypeUseAnnotations {
+ List<@TA(x = 5) String> foo;
+ @java.lang.SuppressWarnings("all")
+ public List<@TA(x = 5) String> getFoo() {
+ return this.foo;
+ }
+}
diff --git a/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNull.java b/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNull.java
index 7265e17a..7feff6e9 100644
--- a/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNull.java
+++ b/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNull.java
@@ -52,6 +52,6 @@ import lombok.Singular;
return new BuilderSingularToBuilderWithNullBuilder();
}
public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullBuilder toBuilder() {
- return new BuilderSingularToBuilderWithNullBuilder().elems(((this.elems == null) ? java.util.Collections.emptyList() : this.elems));
+ return new BuilderSingularToBuilderWithNullBuilder().elems(((this.elems == null) ? java.util.Collections.<String>emptyList() : this.elems));
}
}
diff --git a/test/transform/resource/after-ecj/BuilderWithToBuilder.java b/test/transform/resource/after-ecj/BuilderWithToBuilder.java
index b9cc27dd..a8935107 100644
--- a/test/transform/resource/after-ecj/BuilderWithToBuilder.java
+++ b/test/transform/resource/after-ecj/BuilderWithToBuilder.java
@@ -74,7 +74,7 @@ import lombok.Builder;
return new BuilderWithToBuilderBuilder<T>();
}
public @java.lang.SuppressWarnings("all") BuilderWithToBuilderBuilder<T> toBuilder() {
- return new BuilderWithToBuilderBuilder<T>().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.rrr(this)).bars(((this.bars == null) ? java.util.Collections.emptyList() : this.bars));
+ return new BuilderWithToBuilderBuilder<T>().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.rrr(this)).bars(((this.bars == null) ? java.util.Collections.<T>emptyList() : this.bars));
}
}
@lombok.experimental.Accessors(prefix = "m") class ConstructorWithToBuilder<T> {
diff --git a/test/transform/resource/after-ecj/TypeUseAnnotations.java b/test/transform/resource/after-ecj/TypeUseAnnotations.java
new file mode 100644
index 00000000..156643b9
--- /dev/null
+++ b/test/transform/resource/after-ecj/TypeUseAnnotations.java
@@ -0,0 +1,15 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) @interface TA {
+ int x();
+}
+class TypeUseAnnotations {
+ @lombok.Getter List<@TA(x = 5) String> foo;
+ TypeUseAnnotations() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") List<@TA(x = 5) String> getFoo() {
+ return this.foo;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/TypeUseAnnotations.java b/test/transform/resource/before/TypeUseAnnotations.java
new file mode 100644
index 00000000..c09a291d
--- /dev/null
+++ b/test/transform/resource/before/TypeUseAnnotations.java
@@ -0,0 +1,11 @@
+//version 8:
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@interface TA {
+ int x();
+}
+class TypeUseAnnotations {
+ @lombok.Getter List<@TA(x=5) String> foo;
+}