2

I'm building a parser using Antlr 4.8, and the @NotNull annotation is marked as deprecated:

org.antlr.v4.runtime.misc Annotation Type NotNull Deprecated. THIS IS HERE FOR BACKWARD COMPATIBILITY WITH 4.5 ONLY. It will disappear in 4.6+

I have searched but haven't found any documentation on what would replace this annotation. Obviously it hasn't disappeared in 4.6+, but I'd like to avoid issues as I move to new versions of Antlr.

Anyone know if there is a replacement for this annotation?

slackwing
  • 27,451
  • 15
  • 82
  • 136
Ramesh
  • 583
  • 1
  • 8
  • 27

1 Answers1

1

You can use @NonNull via

import org.checkerframework.checker.nullness.qual.NonNull;

Here's the import if you're using Maven:

<dependency>
    <groupId>org.checkerframework</groupId>
    <artifactId>checker-qual</artifactId>
    <version>2.10.0</version>
</dependency>
slackwing
  • 27,451
  • 15
  • 82
  • 136