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
Describe the bug
When running the auto-annotator on suppression (and @NullUnmarked) adding mode, I am observing two issues on fields that otherwise already contain annotations:
Duplicated instances of @Nullable added
Lack of spaces between the last added annotation and the field's modifiers
For example, this is the initial code:
@JsonProperty
@JsonInclude(JsonInclude.Include.NON_NULL)
public String foo;
And this the auto-annotator's result (before Google Java Format, but that's irrelevant for now because this code won't build):
Note: a) @Nullable is repeated, despite it already having @SuppressWarnings("NullAway.Init") (which makes no sense combined with @Nullable); b) @Nullablepublic as opposed to @Nullable public
To Reproduce
See code-example above. Configuration includes --chain --activate-downstream-dependencies-analysis --force-resolve.
Expected behavior
I would expect that field to either be annotated:
@JsonProperty
@JsonInclude(JsonInclude.Include.NON_NULL)
@SuppressWarnings("NullAway.Init")
public String foo;
Or:
@JsonProperty
@JsonInclude(JsonInclude.Include.NON_NULL)
@Nullable
public String foo;
Describe the bug
When running the auto-annotator on suppression (and
@NullUnmarked
) adding mode, I am observing two issues on fields that otherwise already contain annotations:@Nullable
addedFor example, this is the initial code:
And this the auto-annotator's result (before Google Java Format, but that's irrelevant for now because this code won't build):
Note: a)
@Nullable
is repeated, despite it already having@SuppressWarnings("NullAway.Init")
(which makes no sense combined with@Nullable
); b)@Nullablepublic
as opposed to@Nullable public
To Reproduce
See code-example above. Configuration includes
--chain --activate-downstream-dependencies-analysis --force-resolve
.Expected behavior
I would expect that field to either be annotated:
Or:
Stack trace
N/A
OS (please complete the following information):
The text was updated successfully, but these errors were encountered: