Skip to content

ASTHelpersSuggestions does not flag call to packge() on com.sun.tools.javac.code.Symbol.ClassSymbol #3482

Closed

Description

@msridhar

I noticed that calls to packge() were not flagged by the new ASTHelpersSuggestions check when the static type of the receiver is com.sun.tools.javac.code.Symbol.ClassSymbol, which just inherits the packge() method from Symbol. I think this is because the check matches on the exact class Symbol:

private static final Matcher<ExpressionTree> SYMBOL =
instanceMethod()
.onExactClass("com.sun.tools.javac.code.Symbol")
.namedAnyOf("isDirectlyOrIndirectlyLocal", "isLocal", "packge", "isStatic");

Was this intentional?

Activity

  1. graememorgan commented on Oct 17, 2022

    @graememorgan
    Contributor

    I've sent a PR to fix this internally, so I'll optimistically mark this as fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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