We should update NullAway to check and assume users are compiling on a recent JDK version and/or passing the -XDaddTypeAnnotationsToSymbol=true flag to javac, so type use annotations appear correctly on symbols from bytecode. This will let us clean up a bunch of old workaround code that discovered such annotations based on raw type attributes. This should only impact those compiling on too-old versions of JDK 17 or 21 or not passing -XDaddTypeAnnotationsToSymbol=true; passing the flag and increasing the JDK point release should be an easy fix.
For checking, we should enable the check from #1317 all the time, not just in JSpecify mode.
We should update NullAway to check and assume users are compiling on a recent JDK version and/or passing the
-XDaddTypeAnnotationsToSymbol=trueflag tojavac, so type use annotations appear correctly on symbols from bytecode. This will let us clean up a bunch of old workaround code that discovered such annotations based on raw type attributes. This should only impact those compiling on too-old versions of JDK 17 or 21 or not passing-XDaddTypeAnnotationsToSymbol=true; passing the flag and increasing the JDK point release should be an easy fix.For checking, we should enable the check from #1317 all the time, not just in JSpecify mode.