ucr-riple / NullAwayAnnotator

A tool to help adapting code bases to NullAway type system.
MIT License
13 stars 6 forks source link

Wrong serialization of @NotNull formal parameters with type use annotation #212

Closed nimakarimipour closed 11 months ago

nimakarimipour commented 11 months ago

Describe the bug Scanner serializes a wrong method signature for @NotNull formal parameters annotated with a type use annotation. The type use annotation fully qualified name is included in the serialized method signature which should not.

To Reproduce Run scanner for the code below:

package test;
import org.jetbrains.annotations.NotNull;
public class A {
  static void foo(@NotNull Object o) {}
  static void bar() { foo(null); }
}

Scanner serializes foo(@org.jetbrains.annotations.NotNull java.lang.Object) as the method signature for o.

Expected behavior It should just serialize foo(java.lang.Object).

Stack trace Not applicable.

OS (please complete the following information):