Skip to content

Remove old workaround code for reading type use annotations from bytecode #1639

Description

@msridhar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions