This change suppresses DefaultPackage check for any java class which uses the default java package, in preparation for enabling a compiler error that will prevent new instances of the bug.

The Google Java Style Guide §8.2.1 requires Java files to have a (non-default) package declaration.  Missing package declarations can cause odd problems that are difficult to debug, such as a class not being included in a test suite or confusion around package-private visibility.

RELNOTES=suppresses warning for using default package

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=307410557
This commit is contained in:
bhagwani 2020-04-20 09:08:12 -07:00 committed by David P. Baker
parent caa3ce8dae
commit 7fcdfa5710

View File

@ -24,6 +24,7 @@ import com.google.errorprone.refaster.annotation.Placeholder;
* Refaster rules to rewrite usages of {@code com.google.common.collect.TreeTraverser} in terms of
* {@code com.google.common.graph.Traverser}.
*/
@SuppressWarnings("DefaultPackage")
public class TraverserRewrite {
abstract class TreeTraverserPreOrder<N> {
@Placeholder