aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-01-20 15:25:08 +0100
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-01-28 16:21:39 +0100
commite95680a76733c22ee5937a586ee50c703d5ba621 (patch)
tree3eaefce07c41760468c3c2a17c86297e2304a730 /src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java
parentfa70b194aa7db62bdbc4cc759a606f97fe50fc92 (diff)
downloadlombok-e95680a76733c22ee5937a586ee50c703d5ba621.tar.gz
lombok-e95680a76733c22ee5937a586ee50c703d5ba621.tar.bz2
lombok-e95680a76733c22ee5937a586ee50c703d5ba621.zip
[issue #2221] [issue #788] Lombok now adds nullity annotations.
Which 'flavour' is defined in lombok.config; applied to toString, equals, canEqual, and plural-form of `@Singular`.
Diffstat (limited to 'src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java')
-rwxr-xr-xsrc/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java b/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java
index 46474b07..959b2cae 100755
--- a/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java
+++ b/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java
@@ -557,6 +557,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
method.arguments = new Argument[] {new Argument(new char[] { 'o' }, 0, objectRef, Modifier.FINAL)};
method.arguments[0].sourceStart = pS; method.arguments[0].sourceEnd = pE;
if (!onParam.isEmpty()) method.arguments[0].annotations = onParam.toArray(new Annotation[0]);
+ EclipseHandlerUtil.createRelevantNullableAnnotation(type, method.arguments[0]);
setGeneratedBy(method.arguments[0], source);
List<Statement> statements = new ArrayList<Statement>();
@@ -806,6 +807,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
method.arguments = new Argument[] {new Argument(otherName, 0, objectRef, Modifier.FINAL)};
method.arguments[0].sourceStart = pS; method.arguments[0].sourceEnd = pE;
if (!onParam.isEmpty()) method.arguments[0].annotations = onParam.toArray(new Annotation[0]);
+ EclipseHandlerUtil.createRelevantNullableAnnotation(type, method.arguments[0]);
setGeneratedBy(method.arguments[0], source);
SingleNameReference otherRef = new SingleNameReference(otherName, p);