我收到一些关于从类上的变量访问静态方法的警告。
有没有办法告诉 errorprone 忽略这些警告?是否容易出错加载了一组“bugpatterns”?是不是所有这些:
我怎样才能覆盖例如这个以停止提示:
Warning:(111, 21) java: [StaticAccessedFromInstance] Static method info should not be accessed from an object instance; instead use Log.info (see errorprone.info/bugpattern/StaticAccessedFromInstance) Did you mean 'Log.info( EntityError.class, Gson.asString(this) );'?
我正在使用 Intellij。
最佳答案
也许我错了;但我认为“eclipse code cleanup”能够自动修复这种代码问题。
我的建议是花时间了解如何轻松修复此类错误;与花时间抑制相应的警告相比。
关于java - Google 容易出错的 Java 编译器 - 默认错误模式?标记忽略?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31044652/