diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2021-03-23 05:08:19 +0100 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2021-03-23 05:19:24 +0100 |
commit | cc98adac012d0d18c70628eb5e6f1646ce574e8a (patch) | |
tree | 92e77d3437d7d0ba2b55576cc87fedbb0e04dec1 /test/transform/resource/before | |
parent | 2eabd8485df6fb01e05cf7bcf797d922b9d4e012 (diff) | |
download | lombok-cc98adac012d0d18c70628eb5e6f1646ce574e8a.tar.gz lombok-cc98adac012d0d18c70628eb5e6f1646ce574e8a.tar.bz2 lombok-cc98adac012d0d18c70628eb5e6f1646ce574e8a.zip |
[records] [javac] Putting `@NonNull` on a 'field' of a record now affects the compact constructors, generating one if need be.
Diffstat (limited to 'test/transform/resource/before')
-rw-r--r-- | test/transform/resource/before/NonNullOnRecord.java | 3 | ||||
-rw-r--r-- | test/transform/resource/before/NonNullOnRecord2.java | 9 | ||||
-rw-r--r-- | test/transform/resource/before/NonNullOnRecord3.java | 13 |
3 files changed, 22 insertions, 3 deletions
diff --git a/test/transform/resource/before/NonNullOnRecord.java b/test/transform/resource/before/NonNullOnRecord.java index 223f8cbb..56a96433 100644 --- a/test/transform/resource/before/NonNullOnRecord.java +++ b/test/transform/resource/before/NonNullOnRecord.java @@ -3,7 +3,4 @@ import lombok.NonNull; record NonNullOnRecord(@NonNull String a, @NonNull String b) { - public void method(@NonNull String param) { - String asd = "a"; - } }
\ No newline at end of file diff --git a/test/transform/resource/before/NonNullOnRecord2.java b/test/transform/resource/before/NonNullOnRecord2.java new file mode 100644 index 00000000..3a4eacd4 --- /dev/null +++ b/test/transform/resource/before/NonNullOnRecord2.java @@ -0,0 +1,9 @@ +// version 14: + +import lombok.NonNull; + +record NonNullOnRecord2(@NonNull String a) { + public NonNullOnRecord2 { + System.out.println("Hello"); + } +}
\ No newline at end of file diff --git a/test/transform/resource/before/NonNullOnRecord3.java b/test/transform/resource/before/NonNullOnRecord3.java new file mode 100644 index 00000000..88870192 --- /dev/null +++ b/test/transform/resource/before/NonNullOnRecord3.java @@ -0,0 +1,13 @@ +// version 14: + +import lombok.NonNull; + +record NonNullOnRecord3(@NonNull String a) { + public NonNullOnRecord3(String a) { + this.a = a; + } + + public void method(@NonNull String param) { + String asd = "a"; + } +}
\ No newline at end of file |