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
Replace CGLIB with custom code to generate "enhancers" and "fast-classes".
Some user visible changes from using cglib:
- intercepted method that has a return type of int but returns null from the interceptor will no longer be automatically converted to 0, instead a NullPointerException will be thrown.
- Scope implementation can no longer check for circular proxy instance using CircularDependencyProxy marker class, instead should use Scopes.isCircularProxy
- Depending on which custom class loading option is used, Guice enhanced class may no longer be mockable/spyable
- Generated class name is slightly longer.
Closes#1298
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=320433559
We will still collect multiple errors during configuration, but during
provisioning there are fewer benefits and in highly connected binding graphs
this can result in an error being reported once for every path to a broken
binding. Even with this change multiple errors can be collected while injecting multiple members of a single object and in a few other less common ways (returning null from a non-nullable injection point). But this cl removes the most common way.
This is also an enabling change. With this it should be possible to move all
calls to Errors.withSource into catch blocks in the factory objects. So that
instead of recording progress as we provision, we will only record the sources
when the provision actually fails. This will save an allocation for every node
and edge in the binding graph. (this change will happen in a followup)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173327556
In 41f307e21b this AbstractModule.configure() became non-abstract in the base class, so it is now allowed for subclasses to not override the method at all when they don’t need to access the binding dsl.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148043119
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
* 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