Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here is the home page for the JetBrains annotations Maven project: https://github.com/JetBrains/java-annotations

Example

Here's an example. I annotated the clientVersion parameter to writeHandshakeMessage this way:

  public void writeHandshakeMessage(DataOutputStream dos, byte type, String p_msg,
      @NotNull final KnownVersion clientVersion, byte endpointType, int queueSize)
      throws IOException {

Here is the IDE highlighting a situation where an (indirect) caller may be passing null:

imageImage Added

Under "More actions" I pick "Navigate to 'null' argument usages":

imageImage Added

…where I find this call-site passing a null for clientVersion:

imageImage Added

I could've found this without IDE support. But in this case, I didn't find it until I leveraged the IDE support.