Changes include:
- update Guice tests that asserts error messages
- export new errors tests
- update Guice compiler flag so parameter names are available at runtime, which is required for the errors tests
PiperOrigin-RevId: 337602195
Changes include:
- update Guice tests that asserts error messages
- export new errors tests
- update Guice compiler flag so parameter names are available at runtime, which is required for the errors tests
PiperOrigin-RevId: 337401912
Generated with refaster, with some manual touch-ups afterwards.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=238042288
configure a presubmit to ensure that it stays formatted.
Highlights include:
* simplified import order
* method annotations are now consistently defined on the preceding line
* javadoc reformatted to 100 chars column width
One test that contained line numbers in error messages had to be modified and
the formatter didn't like some of the more complicated preprocessor directives
(MOE and AOP).
To avoid formatting the copyright notices as javadoc i did a preprocessing step to rewrite the initial '/**' to '/*' using perl
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132718493
99% of this is adding missing @Override annotations, in the long tail we also have
* insert missing calls to Assert.fail() in tests that are testing exception behavior
* rewrite a few cases of Foo.class.instanceof(c) to c instanceof Foo
* rewrite Class.newInstance - > Class.getConstructor().newInstance() which doesn't break checked exception checking.
* adding @javax.inject.Inject annotations to methods that override methods annotated with @javax.inject.Inject
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131839622
retain references to their parent classes. Still some more work to do in
WeakKeySet to let it clean up more frequently, but this should help for now.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=89328452
@Retention(RUNTIME)
@BindingAnnotation @interface AllDefaults {
int hasDefault() default 1;
}
@AllDefaults class Foo {}
void testKey() {
assertEquals(Key.get(Foo.class, Foo.class.getAnnotation(AllDefaults.class)),
Key.get(Foo.class, AllDefaults.class));
}
Also adds an option to "require exact binding annotations", which disables the error-prone fallback built into Guice whereby a binding for @Named Foo can substitute for @Named("foo") Foo if the latter doesn't exist but the former does.
-----------------
Manually Synced.
COMMIT=45600016
* Sort imports
* Convert tabs to spaces
* Fix the ant no_aop build
Revision created by MOE tool push_codebase.
MOE_MIGRATION=2532
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1572 d779f126-a31b-0410-b53b-1d3aecad763e