Because error-prone treats more than one scope annotation on a class as a compile-time error, existing builds that upgrade to error prone will fail. To support that, given that these are tests of the run-time version of the failure, add a supporession to the usages.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=51282197
MOE_MIGRATED_REVID=51282207
diff --git a/core/test/com/google/inject/ErrorHandlingTest.java b/core/test/com/google/inject/ErrorHandlingTest.java
index 3a1a142..19161ca 100644
--- a/core/test/com/google/inject/ErrorHandlingTest.java
+++ b/core/test/com/google/inject/ErrorHandlingTest.java
@@ -100,7 +100,9 @@
Invalid(String s) {}
}
- @Singleton @GoodScope
+ @SuppressWarnings("MoreThanOneScopeAnnotationOnClass") // suppress compiler error to test
+ @Singleton
+ @GoodScope
static class TooManyScopes {
}
diff --git a/core/test/com/google/inject/ScopesTest.java b/core/test/com/google/inject/ScopesTest.java
index 7fd328a..d8789f3 100644
--- a/core/test/com/google/inject/ScopesTest.java
+++ b/core/test/com/google/inject/ScopesTest.java
@@ -413,7 +413,9 @@
final int instanceId = nextInstanceId++;
}
- @Singleton @CustomScoped
+ @SuppressWarnings("MoreThanOneScopeAnnotationOnClass") // suppress compiler error for testing
+ @Singleton
+ @CustomScoped
static class SingletonAndCustomScoped {}
@ImplementedBy(Implementation.class)