Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add @SuppressWarnings("AutoValueSubclassLeaked") #19

Open
ben-manes opened this issue Nov 14, 2020 · 1 comment
Open

Add @SuppressWarnings("AutoValueSubclassLeaked") #19

ben-manes opened this issue Nov 14, 2020 · 1 comment

Comments

@ben-manes
Copy link

I'm adding this to a new project and received the warning,

 [AutoValueSubclassLeaked] Do not refer to the autogenerated AutoValue_ class outside the file containing the corresponding @AutoValue base class.
    PolicyStats.Metric result = new AutoValue_PolicyStats_Metric(
                                    ^
    (see https://errorprone.info/bugpattern/AutoValueSubclassLeaked)

This seems to be due to the build() method. Ideally this should be suppressed directly, rather than in the error prone configuration.

@ben-manes
Copy link
Author

I forgot to add excludedPaths = "${buildDir}/generated-sources/.*" in the new project. Still seems like a nice change though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant