You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
hi @Bananeweizen ; thanks for the suggestion! One thing to check perhaps before we make the nullable annotation configurable, is if your desired argument supports this style of use:
@timtebeek Your question is basically: Is my null annotation a declaration annotation (Java 5) or a type annotation (Java 8) using @Target({...}). AFAIK all type annotations fit your needs (or the FQN case like java.io.@Nullable File) and similar. My null annotation (Eclipse JDT) definitely fits, and I would also expect other major null annotations to be type annotations nowadays.
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"?
The text was updated successfully, but these errors were encountered: