Skip to content

Suggested solutions #39

Description

@mk868

Sometimes we are able to clearly suggest a solution to an error in the user code.

For example:

  • @Nullable int[] -> probably meant int @Nullable []
  • @NonNull
    public class Service1
    
    ->
    @NullMarked
    public class Service1
    

In a report, it might look like this:

{
  "kind": "INVALID_NULLNESS_ON_PRIMITIVE",
  "message": "Primitive types cannot be annotated with @Nullable or @NonNull!",
  "solution": "Do you mean `int @Nullable []`?"
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions