From 6f204d98c450092f4a6252677fc44657704b9897 Mon Sep 17 00:00:00 2001 From: Rawi01 Date: Mon, 13 Mar 2023 19:55:52 +0100 Subject: [fixes #3366] Handle @NonNull type annotations on record components --- .../lombok/eclipse/handlers/HandleNonNull.java | 54 ++++++++++------------ src/core/lombok/javac/handlers/HandleNonNull.java | 39 +++++++--------- .../resource/after-delombok/NonNullOnRecord.java | 13 ------ .../resource/after-delombok/NonNullOnRecord2.java | 10 ---- .../resource/after-delombok/NonNullOnRecord3.java | 13 ------ .../NonNullOnRecordExistingConstructor.java | 10 ++++ .../NonNullOnRecordExistingSetter.java | 13 ++++++ .../after-delombok/NonNullOnRecordSimple.java | 13 ++++++ .../after-delombok/NonNullOnRecordTypeUse.java | 13 ++++++ .../resource/after-ecj/NonNullOnRecord.java | 19 -------- .../resource/after-ecj/NonNullOnRecord2.java | 14 ------ .../resource/after-ecj/NonNullOnRecord3.java | 16 ------- .../NonNullOnRecordExistingConstructor.java | 14 ++++++ .../after-ecj/NonNullOnRecordExistingSetter.java | 16 +++++++ .../resource/after-ecj/NonNullOnRecordSimple.java | 19 ++++++++ .../resource/after-ecj/NonNullOnRecordTypeUse.java | 21 +++++++++ .../transform/resource/before/NonNullOnRecord.java | 6 --- .../resource/before/NonNullOnRecord2.java | 9 ---- .../resource/before/NonNullOnRecord3.java | 13 ------ .../before/NonNullOnRecordExistingConstructor.java | 9 ++++ .../before/NonNullOnRecordExistingSetter.java | 13 ++++++ .../resource/before/NonNullOnRecordSimple.java | 6 +++ .../resource/before/NonNullOnRecordTypeUse.java | 6 +++ test/transform/resource/before/RecordNonNull | 0 24 files changed, 194 insertions(+), 165 deletions(-) delete mode 100644 test/transform/resource/after-delombok/NonNullOnRecord.java delete mode 100644 test/transform/resource/after-delombok/NonNullOnRecord2.java delete mode 100644 test/transform/resource/after-delombok/NonNullOnRecord3.java create mode 100644 test/transform/resource/after-delombok/NonNullOnRecordExistingConstructor.java create mode 100644 test/transform/resource/after-delombok/NonNullOnRecordExistingSetter.java create mode 100644 test/transform/resource/after-delombok/NonNullOnRecordSimple.java create mode 100644 test/transform/resource/after-delombok/NonNullOnRecordTypeUse.java delete mode 100644 test/transform/resource/after-ecj/NonNullOnRecord.java delete mode 100644 test/transform/resource/after-ecj/NonNullOnRecord2.java delete mode 100644 test/transform/resource/after-ecj/NonNullOnRecord3.java create mode 100644 test/transform/resource/after-ecj/NonNullOnRecordExistingConstructor.java create mode 100644 test/transform/resource/after-ecj/NonNullOnRecordExistingSetter.java create mode 100644 test/transform/resource/after-ecj/NonNullOnRecordSimple.java create mode 100644 test/transform/resource/after-ecj/NonNullOnRecordTypeUse.java delete mode 100644 test/transform/resource/before/NonNullOnRecord.java delete mode 100644 test/transform/resource/before/NonNullOnRecord2.java delete mode 100644 test/transform/resource/before/NonNullOnRecord3.java create mode 100644 test/transform/resource/before/NonNullOnRecordExistingConstructor.java create mode 100644 test/transform/resource/before/NonNullOnRecordExistingSetter.java create mode 100644 test/transform/resource/before/NonNullOnRecordSimple.java create mode 100644 test/transform/resource/before/NonNullOnRecordTypeUse.java create mode 100644 test/transform/resource/before/RecordNonNull diff --git a/src/core/lombok/eclipse/handlers/HandleNonNull.java b/src/core/lombok/eclipse/handlers/HandleNonNull.java index 365eef33..0138c7fb 100644 --- a/src/core/lombok/eclipse/handlers/HandleNonNull.java +++ b/src/core/lombok/eclipse/handlers/HandleNonNull.java @@ -65,7 +65,6 @@ import lombok.core.AST.Kind; import lombok.core.AnnotationValues; import lombok.core.HandlerPriority; import lombok.eclipse.EcjAugments; -import lombok.eclipse.EclipseAST; import lombok.eclipse.EclipseAnnotationHandler; import lombok.eclipse.EclipseNode; import lombok.spi.Provides; @@ -221,9 +220,16 @@ public class HandleNonNull extends EclipseAnnotationHandler { // As we need both for @NonNull we reset the handled flag during diet parse. if (!annotationNode.isCompleteParse()) { - if (annotationNode.up().getKind() == Kind.FIELD) { + final EclipseNode node; + if (annotationNode.up().getKind() == Kind.TYPE_USE) { + node = annotationNode.directUp().directUp(); + } else { + node = annotationNode.up(); + } + + if (node.getKind() == Kind.FIELD) { //Check if this is a record and we need to generate the compact form constructor. - EclipseNode typeNode = annotationNode.up().up(); + EclipseNode typeNode = node.up(); if (typeNode.getKind() == Kind.TYPE) { if (isRecord(typeNode)) { addCompactConstructorIfNeeded(typeNode, annotationNode); @@ -251,16 +257,23 @@ public class HandleNonNull extends EclipseAnnotationHandler { private void handle0(Annotation ast, EclipseNode annotationNode, boolean force) { handleFlagUsage(annotationNode, ConfigurationKeys.NON_NULL_FLAG_USAGE, "@NonNull"); - if (annotationNode.up().getKind() == Kind.FIELD) { + final EclipseNode node; + if (annotationNode.up().getKind() == Kind.TYPE_USE) { + node = annotationNode.directUp().directUp(); + } else { + node = annotationNode.up(); + } + + if (node.getKind() == Kind.FIELD) { // This is meaningless unless the field is used to generate a method (@Setter, @RequiredArgsConstructor, etc), // but in that case those handlers will take care of it. However, we DO check if the annotation is applied to // a primitive, because those handlers trigger on any annotation named @NonNull and we only want the warning // behaviour on _OUR_ 'lombok.NonNull'. - EclipseNode fieldNode = annotationNode.up(); + EclipseNode fieldNode = node; EclipseNode typeNode = fieldNode.up(); try { - if (isPrimitive(((AbstractVariableDeclaration) annotationNode.up().get()).type)) { + if (isPrimitive(((AbstractVariableDeclaration) node.get()).type)) { annotationNode.addWarning("@NonNull is meaningless on a primitive."); return; } @@ -279,33 +292,14 @@ public class HandleNonNull extends EclipseAnnotationHandler { return; } + if (node.getKind() != Kind.ARGUMENT) return; + Argument param; - EclipseNode paramNode; AbstractMethodDeclaration declaration; - switch (annotationNode.up().getKind()) { - case ARGUMENT: - paramNode = annotationNode.up(); - break; - case TYPE_USE: - EclipseNode typeNode = annotationNode.directUp(); - boolean ok = false; - ASTNode astNode = typeNode.get(); - if (astNode instanceof TypeReference) { - Annotation[] anns = EclipseAST.getTopLevelTypeReferenceAnnotations((TypeReference) astNode); - if (anns == null) return; - for (Annotation ann : anns) if (ast == ann) ok = true; - } - if (!ok) return; - paramNode = typeNode.directUp(); - break; - default: - return; - } - try { - param = (Argument) paramNode.get(); - declaration = (AbstractMethodDeclaration) paramNode.up().get(); + param = (Argument) node.get(); + declaration = (AbstractMethodDeclaration) node.up().get(); } catch (Exception e) { return; } @@ -318,7 +312,7 @@ public class HandleNonNull extends EclipseAnnotationHandler { } addNullCheckIfNeeded(declaration, param, annotationNode); - paramNode.up().rebuild(); + node.up().rebuild(); } private void addNullCheckIfNeeded(AbstractMethodDeclaration declaration, AbstractVariableDeclaration param, EclipseNode annotationNode) { diff --git a/src/core/lombok/javac/handlers/HandleNonNull.java b/src/core/lombok/javac/handlers/HandleNonNull.java index 271bedbb..e817916d 100644 --- a/src/core/lombok/javac/handlers/HandleNonNull.java +++ b/src/core/lombok/javac/handlers/HandleNonNull.java @@ -218,48 +218,43 @@ public class HandleNonNull extends JavacAnnotationHandler { @Override public void handle(AnnotationValues annotation, JCAnnotation ast, JavacNode annotationNode) { handleFlagUsage(annotationNode, ConfigurationKeys.NON_NULL_FLAG_USAGE, "@NonNull"); - if (annotationNode.up().getKind() == Kind.FIELD) { + + final JavacNode node; + if (annotationNode.up().getKind() == Kind.TYPE_USE) { + node = annotationNode.directUp().directUp(); + } else { + node = annotationNode.up(); + } + + if (node.getKind() == Kind.FIELD) { // This is meaningless unless the field is used to generate a method (@Setter, @RequiredArgsConstructor, etc), // but in that case those handlers will take care of it. However, we DO check if the annotation is applied to // a primitive, because those handlers trigger on any annotation named @NonNull and we only want the warning // behaviour on _OUR_ 'lombok.NonNull'. try { - if (isPrimitive(((JCVariableDecl) annotationNode.up().get()).vartype)) { + if (isPrimitive(((JCVariableDecl) node.get()).vartype)) { annotationNode.addWarning("@NonNull is meaningless on a primitive."); } } catch (Exception ignore) {} - JCVariableDecl fDecl = (JCVariableDecl) annotationNode.up().get(); + JCVariableDecl fDecl = (JCVariableDecl) node.get(); if ((fDecl.mods.flags & RECORD) != 0) { // well, these kinda double as parameters (of the compact constructor), so we do some work here. - List compactConstructors = addCompactConstructorIfNeeded(annotationNode.up().up(), annotationNode); + List compactConstructors = addCompactConstructorIfNeeded(node.up(), annotationNode); for (JCMethodDecl ctr : compactConstructors) { - addNullCheckIfNeeded(ctr, annotationNode.up(), annotationNode); + addNullCheckIfNeeded(ctr, node, annotationNode); } } return; } - JCMethodDecl declaration; - JavacNode paramNode; + if (node.getKind() != Kind.ARGUMENT) return; - switch (annotationNode.up().getKind()) { - case ARGUMENT: - paramNode = annotationNode.up(); - break; - case TYPE_USE: - JavacNode typeNode = annotationNode.directUp(); - paramNode = typeNode.directUp(); - break; - default: - return; - } - - if (paramNode.getKind() != Kind.ARGUMENT) return; + JCMethodDecl declaration; try { - declaration = (JCMethodDecl) paramNode.up().get(); + declaration = (JCMethodDecl) node.up().get(); } catch (Exception e) { return; } @@ -276,7 +271,7 @@ public class HandleNonNull extends JavacAnnotationHandler { return; } - addNullCheckIfNeeded(declaration, paramNode, annotationNode); + addNullCheckIfNeeded(declaration, node, annotationNode); } public boolean isNullCheck(JCStatement stat) { diff --git a/test/transform/resource/after-delombok/NonNullOnRecord.java b/test/transform/resource/after-delombok/NonNullOnRecord.java deleted file mode 100644 index 465c30db..00000000 --- a/test/transform/resource/after-delombok/NonNullOnRecord.java +++ /dev/null @@ -1,13 +0,0 @@ -// version 16: -import lombok.NonNull; -public record NonNullOnRecord(@NonNull String a, @NonNull String b) { - @java.lang.SuppressWarnings("all") - public NonNullOnRecord { - if (a == null) { - throw new java.lang.NullPointerException("a is marked non-null but is null"); - } - if (b == null) { - throw new java.lang.NullPointerException("b is marked non-null but is null"); - } - } -} diff --git a/test/transform/resource/after-delombok/NonNullOnRecord2.java b/test/transform/resource/after-delombok/NonNullOnRecord2.java deleted file mode 100644 index d3021350..00000000 --- a/test/transform/resource/after-delombok/NonNullOnRecord2.java +++ /dev/null @@ -1,10 +0,0 @@ -// version 16: -import lombok.NonNull; -record NonNullOnRecord2(@NonNull String a) { - public NonNullOnRecord2 { - if (a == null) { - throw new java.lang.NullPointerException("a is marked non-null but is null"); - } - System.out.println("Hello"); - } -} diff --git a/test/transform/resource/after-delombok/NonNullOnRecord3.java b/test/transform/resource/after-delombok/NonNullOnRecord3.java deleted file mode 100644 index 62b385bc..00000000 --- a/test/transform/resource/after-delombok/NonNullOnRecord3.java +++ /dev/null @@ -1,13 +0,0 @@ -// version 14: -import lombok.NonNull; -public record NonNullOnRecord3(@NonNull String a) { - public NonNullOnRecord3(String a) { - this.a = a; - } - public void method(@NonNull String param) { - if (param == null) { - throw new java.lang.NullPointerException("param is marked non-null but is null"); - } - String asd = "a"; - } -} diff --git a/test/transform/resource/after-delombok/NonNullOnRecordExistingConstructor.java b/test/transform/resource/after-delombok/NonNullOnRecordExistingConstructor.java new file mode 100644 index 00000000..e3fdc2fc --- /dev/null +++ b/test/transform/resource/after-delombok/NonNullOnRecordExistingConstructor.java @@ -0,0 +1,10 @@ +// version 16: +import lombok.NonNull; +public record NonNullOnRecordExistingConstructor(@NonNull String a) { + public NonNullOnRecordExistingConstructor { + if (a == null) { + throw new java.lang.NullPointerException("a is marked non-null but is null"); + } + System.out.println("Hello"); + } +} diff --git a/test/transform/resource/after-delombok/NonNullOnRecordExistingSetter.java b/test/transform/resource/after-delombok/NonNullOnRecordExistingSetter.java new file mode 100644 index 00000000..11aaca49 --- /dev/null +++ b/test/transform/resource/after-delombok/NonNullOnRecordExistingSetter.java @@ -0,0 +1,13 @@ +// version 14: +import lombok.NonNull; +public record NonNullOnRecordExistingSetter(@NonNull String a) { + public NonNullOnRecordExistingSetter(String a) { + this.a = a; + } + public void method(@NonNull String param) { + if (param == null) { + throw new java.lang.NullPointerException("param is marked non-null but is null"); + } + String asd = "a"; + } +} diff --git a/test/transform/resource/after-delombok/NonNullOnRecordSimple.java b/test/transform/resource/after-delombok/NonNullOnRecordSimple.java new file mode 100644 index 00000000..2a772c93 --- /dev/null +++ b/test/transform/resource/after-delombok/NonNullOnRecordSimple.java @@ -0,0 +1,13 @@ +// version 16: +import lombok.NonNull; +public record NonNullOnRecordSimple(@NonNull String a, @NonNull String b) { + @java.lang.SuppressWarnings("all") + public NonNullOnRecordSimple { + if (a == null) { + throw new java.lang.NullPointerException("a is marked non-null but is null"); + } + if (b == null) { + throw new java.lang.NullPointerException("b is marked non-null but is null"); + } + } +} diff --git a/test/transform/resource/after-delombok/NonNullOnRecordTypeUse.java b/test/transform/resource/after-delombok/NonNullOnRecordTypeUse.java new file mode 100644 index 00000000..e5b78f1c --- /dev/null +++ b/test/transform/resource/after-delombok/NonNullOnRecordTypeUse.java @@ -0,0 +1,13 @@ +// version 16: +import lombok.NonNull; +public record NonNullOnRecordTypeUse(@NonNull int[] a, int @NonNull [] b, int[] @NonNull [] c) { + @java.lang.SuppressWarnings("all") + public NonNullOnRecordTypeUse { + if (a == null) { + throw new java.lang.NullPointerException("a is marked non-null but is null"); + } + if (b == null) { + throw new java.lang.NullPointerException("b is marked non-null but is null"); + } + } +} diff --git a/test/transform/resource/after-ecj/NonNullOnRecord.java b/test/transform/resource/after-ecj/NonNullOnRecord.java deleted file mode 100644 index d80e243b..00000000 --- a/test/transform/resource/after-ecj/NonNullOnRecord.java +++ /dev/null @@ -1,19 +0,0 @@ -// version 14: -import lombok.NonNull; -public record NonNullOnRecord(String a, String b) { -/* Implicit */ private final String a; -/* Implicit */ private final String b; - public @java.lang.SuppressWarnings("all") NonNullOnRecord(@NonNull String a, @NonNull String b) { - super(); - if ((a == null)) - { - throw new java.lang.NullPointerException("a is marked non-null but is null"); - } - if ((b == null)) - { - throw new java.lang.NullPointerException("b is marked non-null but is null"); - } - this.a = a; - this.b = b; - } -} diff --git a/test/transform/resource/after-ecj/NonNullOnRecord2.java b/test/transform/resource/after-ecj/NonNullOnRecord2.java deleted file mode 100644 index 5820d453..00000000 --- a/test/transform/resource/after-ecj/NonNullOnRecord2.java +++ /dev/null @@ -1,14 +0,0 @@ -// version 14: -import lombok.NonNull; -record NonNullOnRecord2(String a) { -/* Implicit */ private final String a; - public NonNullOnRecord2(@NonNull String a) { - super(); - if ((a == null)) - { - throw new java.lang.NullPointerException("a is marked non-null but is null"); - } - System.out.println("Hello"); - this.a = a; - } -} diff --git a/test/transform/resource/after-ecj/NonNullOnRecord3.java b/test/transform/resource/after-ecj/NonNullOnRecord3.java deleted file mode 100644 index 37f0afcf..00000000 --- a/test/transform/resource/after-ecj/NonNullOnRecord3.java +++ /dev/null @@ -1,16 +0,0 @@ -// version 19: -import lombok.NonNull; -public record NonNullOnRecord3(String a) { -/* Implicit */ private final String a; - public NonNullOnRecord3(String a) { - super(); - this.a = a; - } - public void method(@NonNull String param) { - if ((param == null)) - { - throw new java.lang.NullPointerException("param is marked non-null but is null"); - } - String asd = "a"; - } -} diff --git a/test/transform/resource/after-ecj/NonNullOnRecordExistingConstructor.java b/test/transform/resource/after-ecj/NonNullOnRecordExistingConstructor.java new file mode 100644 index 00000000..4323113f --- /dev/null +++ b/test/transform/resource/after-ecj/NonNullOnRecordExistingConstructor.java @@ -0,0 +1,14 @@ +// version 14: +import lombok.NonNull; +public record NonNullOnRecordExistingConstructor(String a) { +/* Implicit */ private final String a; + public NonNullOnRecordExistingConstructor(@NonNull String a) { + super(); + if ((a == null)) + { + throw new java.lang.NullPointerException("a is marked non-null but is null"); + } + System.out.println("Hello"); + this.a = a; + } +} diff --git a/test/transform/resource/after-ecj/NonNullOnRecordExistingSetter.java b/test/transform/resource/after-ecj/NonNullOnRecordExistingSetter.java new file mode 100644 index 00000000..1bdaf29f --- /dev/null +++ b/test/transform/resource/after-ecj/NonNullOnRecordExistingSetter.java @@ -0,0 +1,16 @@ +// version 19: +import lombok.NonNull; +public record NonNullOnRecordExistingSetter(String a) { +/* Implicit */ private final String a; + public NonNullOnRecordExistingSetter(String a) { + super(); + this.a = a; + } + public void method(@NonNull String param) { + if ((param == null)) + { + throw new java.lang.NullPointerException("param is marked non-null but is null"); + } + String asd = "a"; + } +} diff --git a/test/transform/resource/after-ecj/NonNullOnRecordSimple.java b/test/transform/resource/after-ecj/NonNullOnRecordSimple.java new file mode 100644 index 00000000..ee1510ea --- /dev/null +++ b/test/transform/resource/after-ecj/NonNullOnRecordSimple.java @@ -0,0 +1,19 @@ +// version 14: +import lombok.NonNull; +public record NonNullOnRecordSimple(String a, String b) { +/* Implicit */ private final String a; +/* Implicit */ private final String b; + public @java.lang.SuppressWarnings("all") NonNullOnRecordSimple(@NonNull String a, @NonNull String b) { + super(); + if ((a == null)) + { + throw new java.lang.NullPointerException("a is marked non-null but is null"); + } + if ((b == null)) + { + throw new java.lang.NullPointerException("b is marked non-null but is null"); + } + this.a = a; + this.b = b; + } +} diff --git a/test/transform/resource/after-ecj/NonNullOnRecordTypeUse.java b/test/transform/resource/after-ecj/NonNullOnRecordTypeUse.java new file mode 100644 index 00000000..4f040c2e --- /dev/null +++ b/test/transform/resource/after-ecj/NonNullOnRecordTypeUse.java @@ -0,0 +1,21 @@ +// version 14: +import lombok.NonNull; +public record NonNullOnRecordTypeUse(int a, int b, int c) { +/* Implicit */ private final int[] a; +/* Implicit */ private final int @NonNull [] b; +/* Implicit */ private final int[] @NonNull [] c; + public @java.lang.SuppressWarnings("all") NonNullOnRecordTypeUse(@NonNull int[] a, int @NonNull [] b, int[] @NonNull [] c) { + super(); + if ((a == null)) + { + throw new java.lang.NullPointerException("a is marked non-null but is null"); + } + if ((b == null)) + { + throw new java.lang.NullPointerException("b is marked non-null but is null"); + } + this.a = a; + this.b = b; + this.c = c; + } +} diff --git a/test/transform/resource/before/NonNullOnRecord.java b/test/transform/resource/before/NonNullOnRecord.java deleted file mode 100644 index ba6121a6..00000000 --- a/test/transform/resource/before/NonNullOnRecord.java +++ /dev/null @@ -1,6 +0,0 @@ -// version 14: - -import lombok.NonNull; - -public record NonNullOnRecord(@NonNull String a, @NonNull String b) { -} \ No newline at end of file diff --git a/test/transform/resource/before/NonNullOnRecord2.java b/test/transform/resource/before/NonNullOnRecord2.java deleted file mode 100644 index 3a4eacd4..00000000 --- a/test/transform/resource/before/NonNullOnRecord2.java +++ /dev/null @@ -1,9 +0,0 @@ -// 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 deleted file mode 100644 index 24198002..00000000 --- a/test/transform/resource/before/NonNullOnRecord3.java +++ /dev/null @@ -1,13 +0,0 @@ -// version 14: - -import lombok.NonNull; - -public 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 diff --git a/test/transform/resource/before/NonNullOnRecordExistingConstructor.java b/test/transform/resource/before/NonNullOnRecordExistingConstructor.java new file mode 100644 index 00000000..7bab2a8a --- /dev/null +++ b/test/transform/resource/before/NonNullOnRecordExistingConstructor.java @@ -0,0 +1,9 @@ +// version 14: + +import lombok.NonNull; + +public record NonNullOnRecordExistingConstructor(@NonNull String a) { + public NonNullOnRecordExistingConstructor { + System.out.println("Hello"); + } +} \ No newline at end of file diff --git a/test/transform/resource/before/NonNullOnRecordExistingSetter.java b/test/transform/resource/before/NonNullOnRecordExistingSetter.java new file mode 100644 index 00000000..dd7b15d8 --- /dev/null +++ b/test/transform/resource/before/NonNullOnRecordExistingSetter.java @@ -0,0 +1,13 @@ +// version 14: + +import lombok.NonNull; + +public record NonNullOnRecordExistingSetter(@NonNull String a) { + public NonNullOnRecordExistingSetter(String a) { + this.a = a; + } + + public void method(@NonNull String param) { + String asd = "a"; + } +} \ No newline at end of file diff --git a/test/transform/resource/before/NonNullOnRecordSimple.java b/test/transform/resource/before/NonNullOnRecordSimple.java new file mode 100644 index 00000000..0d0a1f9f --- /dev/null +++ b/test/transform/resource/before/NonNullOnRecordSimple.java @@ -0,0 +1,6 @@ +// version 14: + +import lombok.NonNull; + +public record NonNullOnRecordSimple(@NonNull String a, @NonNull String b) { +} \ No newline at end of file diff --git a/test/transform/resource/before/NonNullOnRecordTypeUse.java b/test/transform/resource/before/NonNullOnRecordTypeUse.java new file mode 100644 index 00000000..5f89695d --- /dev/null +++ b/test/transform/resource/before/NonNullOnRecordTypeUse.java @@ -0,0 +1,6 @@ +// version 14: + +import lombok.NonNull; + +public record NonNullOnRecordTypeUse(@NonNull int [] a, int @NonNull [] b, int [] @NonNull [] c) { +} \ No newline at end of file diff --git a/test/transform/resource/before/RecordNonNull b/test/transform/resource/before/RecordNonNull new file mode 100644 index 00000000..e69de29b -- cgit