这是indexloc提供的服务,不要输入任何密码
Skip to content

[BUG] EqualsAndHashCode duplicates Nullable annotations with NonNullByDefault and lombok.addNullAnnotations #3120

@jopatai

Description

@jopatai

Describe the bug
When a flavor of NonNullByDefault annotation is present, the equals method is (correctly) generated with an overriding Nullable annotation.
When configuration lombok.addNullAnnotations is present, the equals method is (correctly) generated with a Nullable annotation.
When both are present, the same annotation is generated twice, which does not compile.

To Reproduce

//CONF: lombok.addNullAnnotations = javax
@lombok.EqualsAndHashCode
@javax.annotation.ParametersAreNonnullByDefault
class someClass

Expected behavior
Only one annotation is generated.

Version info

  • Lombok version 1.18.22
  • Platform Eclipse 2021-12 (4.22.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions