You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--- foo/Dummy.java+++ foo/Dummy.java@@ -1,12 +1,12 @@
package foo;
-import foo.Dummy.Type;+
final class Dummy {
- private final Type type = Type.SIMPLE;+ private final Dummy.Type type = Dummy.Type.SIMPLE;
enum Type {
- SIMPLE,- COMPLEX;+ Dummy.SIMPLE,+ Dummy.COMPLEX;
}
}
As can be seen, the Type enum declaration is now invalid.
(Related question: perhaps BadImport shouldn't flag any direct imports of types defined in the same compilation unit? That would also automatically fix this bug.)
The text was updated successfully, but these errors were encountered:
Consider the following code:
Applying the
BadImport
check to this code:wget \ https://repo1.maven.org/maven2/com/google/errorprone/error_prone_core/2.4.0/error_prone_core-2.4.0-with-dependencies.jar javac \ -XDcompilePolicy=simple \ -processorpath error_prone_core-2.4.0-with-dependencies.jar \ '-Xplugin:ErrorProne -XepPatchChecks:BadImport -XepPatchLocation:/tmp' \ foo/Dummy.java
This yields:
As can be seen, the
Type
enum declaration is now invalid.(Related question: perhaps
BadImport
shouldn't flag any direct imports of types defined in the same compilation unit? That would also automatically fix this bug.)The text was updated successfully, but these errors were encountered: