Skip to content

AnnotateNullableMethods should have a parameter for the FQN of the nullable type #428

Description

@Bananeweizen

What problem are you trying to solve?

AnnotateNullableMethods currently adds a fixed Nullable annotation, the one that OpenRewrite uses itself. The fully qualified name for that nullable type should be parameterizable, as many projects use other nullable types. Even OpenRewrite changed its code base just recently to switch to JSpecify.

Describe the solution you'd like

one new argument for the FQN to use, with the default of the current value to not cause migration effort

Have you considered any alternatives or workarounds?

Right now people with other annotations also can just run this recipe and then do a search-replace of the import.

Are you interested in contributing this feature to OpenRewrite?

Yes. Is there a convention for naming parameters or would you suggest a name? "nullableType"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions