aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2013-09-24 01:18:32 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2013-09-24 01:18:32 +0200
commit86a635876dd75c4f3a61593491fa2ce53f8444b8 (patch)
tree86b3a14390f64fcc61375da89bd62764d73a867f /test
parent7ee868659f4ff3cb286b676d649e8c57e9248d87 (diff)
parent72b55dccb18f38b8aefd0ac8e7c2e8bd2dd5c057 (diff)
downloadlombok-86a635876dd75c4f3a61593491fa2ce53f8444b8.tar.gz
lombok-86a635876dd75c4f3a61593491fa2ce53f8444b8.tar.bz2
lombok-86a635876dd75c4f3a61593491fa2ce53f8444b8.zip
Merge branch 'master' into jdk8check
Conflicts: src/core/lombok/core/Version.java src/core/lombok/javac/handlers/HandleConstructor.java test/transform/resource/messages-delombok/EqualsAndHashCodeWithSomeExistingMethods.java.messages test/transform/resource/messages-ecj/EqualsAndHashCodeWithSomeExistingMethods.java.messages
Diffstat (limited to 'test')
-rw-r--r--test/transform/resource/after-delombok/BuilderWithAccessors.java65
-rw-r--r--test/transform/resource/after-delombok/ConstructorsWithAccessors.java15
-rw-r--r--test/transform/resource/after-delombok/NonNullOnParameterAbstract.java10
-rw-r--r--test/transform/resource/after-ecj/BuilderWithAccessors.java47
-rw-r--r--test/transform/resource/after-ecj/ConstructorsWithAccessors.java13
-rw-r--r--test/transform/resource/after-ecj/NonNullOnParameterAbstract.java13
-rw-r--r--test/transform/resource/before/BuilderWithAccessors.java7
-rw-r--r--test/transform/resource/before/ConstructorsWithAccessors.java6
-rw-r--r--test/transform/resource/before/NonNullOnParameterAbstract.java7
-rw-r--r--test/transform/resource/messages-delombok/NonNullOnParameterAbstract.java.messages1
-rw-r--r--test/transform/resource/messages-ecj/NonNullOnParameterAbstract.java.messages1
-rw-r--r--test/transform/resource/messages-idempotent/NonNullOnParameterAbstract.java.messages1
12 files changed, 186 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/BuilderWithAccessors.java b/test/transform/resource/after-delombok/BuilderWithAccessors.java
new file mode 100644
index 00000000..503c33be
--- /dev/null
+++ b/test/transform/resource/after-delombok/BuilderWithAccessors.java
@@ -0,0 +1,65 @@
+class BuilderWithAccessors {
+ private final int plower;
+ private final int pUpper;
+ private int _foo;
+ private int __bar;
+ @java.lang.SuppressWarnings("all")
+ BuilderWithAccessors(final int plower, final int upper, final int foo, final int _bar) {
+ this.plower = plower;
+ this.pUpper = upper;
+ this._foo = foo;
+ this.__bar = _bar;
+ }
+ @java.lang.SuppressWarnings("all")
+ public static class BuilderWithAccessorsBuilder {
+ private int plower;
+ private int upper;
+ private int foo;
+ private int _bar;
+
+ @java.lang.SuppressWarnings("all")
+ BuilderWithAccessorsBuilder() {
+
+ }
+
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithAccessorsBuilder plower(final int plower) {
+ this.plower = plower;
+ return this;
+ }
+
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithAccessorsBuilder upper(final int upper) {
+ this.upper = upper;
+ return this;
+ }
+
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithAccessorsBuilder foo(final int foo) {
+ this.foo = foo;
+ return this;
+ }
+
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithAccessorsBuilder _bar(final int _bar) {
+ this._bar = _bar;
+ return this;
+ }
+
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithAccessors build() {
+ return new BuilderWithAccessors(plower, upper, foo, _bar);
+ }
+
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "BuilderWithAccessors.BuilderWithAccessorsBuilder(plower=" + this.plower + ", upper=" + this.upper + ", foo=" + this.foo + ", _bar=" + this._bar + ")";
+ }
+ }
+
+ @java.lang.SuppressWarnings("all")
+ public static BuilderWithAccessorsBuilder builder() {
+ return new BuilderWithAccessorsBuilder();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/ConstructorsWithAccessors.java b/test/transform/resource/after-delombok/ConstructorsWithAccessors.java
new file mode 100644
index 00000000..9937c7ee
--- /dev/null
+++ b/test/transform/resource/after-delombok/ConstructorsWithAccessors.java
@@ -0,0 +1,15 @@
+class ConstructorsWithAccessors {
+ int plower;
+ int pUpper;
+ int _huh;
+ int __huh2;
+
+ @java.beans.ConstructorProperties({"plower", "upper", "huh", "_huh2"})
+ @java.lang.SuppressWarnings("all")
+ public ConstructorsWithAccessors(final int plower, final int upper, final int huh, final int _huh2) {
+ this.plower = plower;
+ this.pUpper = upper;
+ this._huh = huh;
+ this.__huh2 = _huh2;
+ }
+}
diff --git a/test/transform/resource/after-delombok/NonNullOnParameterAbstract.java b/test/transform/resource/after-delombok/NonNullOnParameterAbstract.java
new file mode 100644
index 00000000..e0330bd6
--- /dev/null
+++ b/test/transform/resource/after-delombok/NonNullOnParameterAbstract.java
@@ -0,0 +1,10 @@
+abstract class NonNullOnParameterAbstract {
+ public void test(@lombok.NonNull String arg) {
+ if (arg == null) {
+ throw new java.lang.NullPointerException("arg");
+ }
+ System.out.println("Hey");
+ }
+
+ public abstract void test2(@lombok.NonNull String arg);
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/BuilderWithAccessors.java b/test/transform/resource/after-ecj/BuilderWithAccessors.java
new file mode 100644
index 00000000..79776dc4
--- /dev/null
+++ b/test/transform/resource/after-ecj/BuilderWithAccessors.java
@@ -0,0 +1,47 @@
+@lombok.experimental.Builder @lombok.experimental.Accessors(prefix = {"p", "_"}) class BuilderWithAccessors {
+ public static @java.lang.SuppressWarnings("all") class BuilderWithAccessorsBuilder {
+ private int plower;
+ private int upper;
+ private int foo;
+ private int _bar;
+ @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder plower(final int plower) {
+ this.plower = plower;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder upper(final int upper) {
+ this.upper = upper;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder foo(final int foo) {
+ this.foo = foo;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder _bar(final int _bar) {
+ this._bar = _bar;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithAccessors build() {
+ return new BuilderWithAccessors(plower, upper, foo, _bar);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (((((((("BuilderWithAccessors.BuilderWithAccessorsBuilder(plower=" + this.plower) + ", upper=") + this.upper) + ", foo=") + this.foo) + ", _bar=") + this._bar) + ")");
+ }
+ }
+ private final int plower;
+ private final int pUpper;
+ private int _foo;
+ private int __bar;
+ @java.lang.SuppressWarnings("all") BuilderWithAccessors(final int plower, final int upper, final int foo, final int _bar) {
+ super();
+ this.plower = plower;
+ this.pUpper = upper;
+ this._foo = foo;
+ this.__bar = _bar;
+ }
+ public static @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder builder() {
+ return new BuilderWithAccessorsBuilder();
+ }
+}
diff --git a/test/transform/resource/after-ecj/ConstructorsWithAccessors.java b/test/transform/resource/after-ecj/ConstructorsWithAccessors.java
new file mode 100644
index 00000000..0df8fbe1
--- /dev/null
+++ b/test/transform/resource/after-ecj/ConstructorsWithAccessors.java
@@ -0,0 +1,13 @@
+@lombok.AllArgsConstructor @lombok.experimental.Accessors(prefix = {"p", "_"}) class ConstructorsWithAccessors {
+ int plower;
+ int pUpper;
+ int _huh;
+ int __huh2;
+ public @java.beans.ConstructorProperties({"plower", "upper", "huh", "_huh2"}) @java.lang.SuppressWarnings("all") ConstructorsWithAccessors(final int plower, final int upper, final int huh, final int _huh2) {
+ super();
+ this.plower = plower;
+ this.pUpper = upper;
+ this._huh = huh;
+ this.__huh2 = _huh2;
+ }
+}
diff --git a/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java b/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java
new file mode 100644
index 00000000..a7dae247
--- /dev/null
+++ b/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java
@@ -0,0 +1,13 @@
+abstract class NonNullOnParameterAbstract {
+ NonNullOnParameterAbstract() {
+ super();
+ }
+ public void test(@lombok.NonNull String arg) {
+ if ((arg == null))
+ {
+ throw new java.lang.NullPointerException("arg");
+ }
+ System.out.println("Hey");
+ }
+ public abstract void test2(@lombok.NonNull String arg);
+} \ No newline at end of file
diff --git a/test/transform/resource/before/BuilderWithAccessors.java b/test/transform/resource/before/BuilderWithAccessors.java
new file mode 100644
index 00000000..4f5660a1
--- /dev/null
+++ b/test/transform/resource/before/BuilderWithAccessors.java
@@ -0,0 +1,7 @@
+@lombok.experimental.Builder @lombok.experimental.Accessors(prefix={"p", "_"})
+class BuilderWithAccessors {
+ private final int plower;
+ private final int pUpper;
+ private int _foo;
+ private int __bar;
+}
diff --git a/test/transform/resource/before/ConstructorsWithAccessors.java b/test/transform/resource/before/ConstructorsWithAccessors.java
new file mode 100644
index 00000000..d242317d
--- /dev/null
+++ b/test/transform/resource/before/ConstructorsWithAccessors.java
@@ -0,0 +1,6 @@
+@lombok.AllArgsConstructor @lombok.experimental.Accessors(prefix={"p", "_"}) class ConstructorsWithAccessors {
+ int plower;
+ int pUpper;
+ int _huh;
+ int __huh2;
+}
diff --git a/test/transform/resource/before/NonNullOnParameterAbstract.java b/test/transform/resource/before/NonNullOnParameterAbstract.java
new file mode 100644
index 00000000..16691184
--- /dev/null
+++ b/test/transform/resource/before/NonNullOnParameterAbstract.java
@@ -0,0 +1,7 @@
+abstract class NonNullOnParameterAbstract {
+ public void test(@lombok.NonNull String arg) {
+ System.out.println("Hey");
+ }
+
+ public abstract void test2(@lombok.NonNull String arg);
+} \ No newline at end of file
diff --git a/test/transform/resource/messages-delombok/NonNullOnParameterAbstract.java.messages b/test/transform/resource/messages-delombok/NonNullOnParameterAbstract.java.messages
new file mode 100644
index 00000000..1ebeea05
--- /dev/null
+++ b/test/transform/resource/messages-delombok/NonNullOnParameterAbstract.java.messages
@@ -0,0 +1 @@
+6:36 @NonNull is meaningless on a parameter of an abstract method.
diff --git a/test/transform/resource/messages-ecj/NonNullOnParameterAbstract.java.messages b/test/transform/resource/messages-ecj/NonNullOnParameterAbstract.java.messages
new file mode 100644
index 00000000..48d1508e
--- /dev/null
+++ b/test/transform/resource/messages-ecj/NonNullOnParameterAbstract.java.messages
@@ -0,0 +1 @@
+6:154 @NonNull is meaningless on a parameter of an abstract method. \ No newline at end of file
diff --git a/test/transform/resource/messages-idempotent/NonNullOnParameterAbstract.java.messages b/test/transform/resource/messages-idempotent/NonNullOnParameterAbstract.java.messages
new file mode 100644
index 00000000..00547171
--- /dev/null
+++ b/test/transform/resource/messages-idempotent/NonNullOnParameterAbstract.java.messages
@@ -0,0 +1 @@
+9:36 @NonNull is meaningless on a parameter of an abstract method. \ No newline at end of file