aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before/I2335_BuilderMultipleObtainVia.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-01-15 00:52:53 +0100
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-01-15 00:52:53 +0100
commit94381d0e9a6871d252e363fa98500d50e8e71dd2 (patch)
tree4e9d8fcc957f4e59ea077827b3373983a6e8650e /test/transform/resource/before/I2335_BuilderMultipleObtainVia.java
parent299078684931e91863d7f3cfcc30d2c8e9eb24ee (diff)
downloadlombok-94381d0e9a6871d252e363fa98500d50e8e71dd2.tar.gz
lombok-94381d0e9a6871d252e363fa98500d50e8e71dd2.tar.bz2
lombok-94381d0e9a6871d252e363fa98500d50e8e71dd2.zip
[fixes #2335] ObtainVia(method=) on more than one arg would crash in javac
Diffstat (limited to 'test/transform/resource/before/I2335_BuilderMultipleObtainVia.java')
-rw-r--r--test/transform/resource/before/I2335_BuilderMultipleObtainVia.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/transform/resource/before/I2335_BuilderMultipleObtainVia.java b/test/transform/resource/before/I2335_BuilderMultipleObtainVia.java
new file mode 100644
index 00000000..ef3723c0
--- /dev/null
+++ b/test/transform/resource/before/I2335_BuilderMultipleObtainVia.java
@@ -0,0 +1,32 @@
+import lombok.Builder;
+
+@Builder
+public class I2335_BuilderMultipleObtainVia {
+ private String theString;
+ private Long theLong;
+
+ @Builder(toBuilder = true)
+ public I2335_BuilderMultipleObtainVia(
+ @Builder.ObtainVia(method = "getTheString") String theString,
+ @Builder.ObtainVia(method = "getTheLong") Long theLong
+ ) {
+ setTheString(theString);
+ setTheLong(theLong);
+ }
+
+ public String getTheString() {
+ return theString;
+ }
+
+ public Long getTheLong() {
+ return theLong;
+ }
+
+ public void setTheString(String theString) {
+ this.theString = theString;
+ }
+
+ public void setTheLong(Long theLong) {
+ this.theLong = theLong;
+ }
+}