diff options
author | JohnPaulTaylorII <johnpaultaylorii@gmail.com> | 2022-03-14 16:03:37 -0400 |
---|---|---|
committer | JohnPaulTaylorII <johnpaultaylorii@gmail.com> | 2022-03-14 16:03:37 -0400 |
commit | 0a1afc875423eebc443347eb002ac87ec0016e4d (patch) | |
tree | 9000c1d7249b31381d2549e7452d90a1d25414d6 /src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java | |
parent | 70bda546114ceccc7714bd6060d96edbcd25e3a0 (diff) | |
download | lombok-0a1afc875423eebc443347eb002ac87ec0016e4d.tar.gz lombok-0a1afc875423eebc443347eb002ac87ec0016e4d.tar.bz2 lombok-0a1afc875423eebc443347eb002ac87ec0016e4d.zip |
[fixes #3133] Additional bits setting when creating type annotations
Diffstat (limited to 'src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java')
-rwxr-xr-x | src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java b/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java index 940612e7..b0e0e526 100755 --- a/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java +++ b/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java @@ -642,13 +642,17 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH method.bodyStart = method.declarationSourceStart = method.sourceStart = source.sourceStart; method.bodyEnd = method.declarationSourceEnd = method.sourceEnd = source.sourceEnd; QualifiedTypeReference objectRef = new QualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT, new long[] { p, p, p }); - if (onParamTypeNullable != null) objectRef.annotations = new Annotation[][] {null, null, onParamTypeNullable}; + if (onParamTypeNullable != null) { + objectRef.annotations = new Annotation[][] {null, null, onParamTypeNullable}; + objectRef.bits |= Eclipse.HasTypeAnnotations; + method.bits |= Eclipse.HasTypeAnnotations; + } setGeneratedBy(objectRef, source); 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() || onParamNullable != null) method.arguments[0].annotations = copyAnnotations(source, onParam.toArray(new Annotation[0]), onParamNullable); - EclipseHandlerUtil.createRelevantNullableAnnotation(type, method.arguments[0], applied); + EclipseHandlerUtil.createRelevantNullableAnnotation(type, method.arguments[0], method, applied); setGeneratedBy(method.arguments[0], source); List<Statement> statements = new ArrayList<Statement>(); @@ -898,7 +902,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]); + EclipseHandlerUtil.createRelevantNullableAnnotation(type, method.arguments[0], method); setGeneratedBy(method.arguments[0], source); SingleNameReference otherRef = new SingleNameReference(otherName, p); |