Commit Graph
14 Commits
Author SHA1 Message Date
Sam Berlin 35023b810b Fix issue 779 -- deduplicate listeners & interceptors. Using a slightly modified patch from Tavian Barnes, thanks Tavian!
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=57798796
2013-12-06 17:34:24 -05:00
Sam Berlin 2823a381af Fix issue 643 using a slightly modified version of the patch provided by
Stuart.

Revision created by MOE tool push_codebase.
MOE_MIGRATION=4270
2012-02-26 21:24:52 -05:00
Sam Berlin 88ee52dec9 Fix issue 670, keep values from MapBinder & Multibinder distinct.
Revision created by MOE tool push_codebase.
MOE_MIGRATION=4268
2012-02-26 21:22:30 -05:00
Sam Berlin 1c9b92a5d8 Fix issue 643 using a slightly modified version of the patch provided by
Stuart.
2012-01-21 12:55:00 -05:00
sberlin b7a02b02d8 * Remove unused imports
* 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
2011-07-08 00:34:16 +00:00
sberlin d9c913acca switch Guice from manually repackaging Guava to depending on Guava. it's still jarjar'd right now, which is causing a ~400k increase in guice-snapshot.jar. next step is to switch to ProGuard to remove the unnecessary code and cut it back down (even further?!). this will let people build from Guice source and depend directly on Guava code without having to worry about hiding internal/util.
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1558 d779f126-a31b-0410-b53b-1d3aecad763e
2011-06-26 21:02:54 +00:00
sberlin be2505a424 specify that interceptors are called in the order they are listed in bindInterceptor(Matcher, Matcher, Interceptor...). add a test that guarantees it.
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1542 d779f126-a31b-0410-b53b-1d3aecad763e
2011-04-21 18:17:15 +00:00
sberlin d4ec8b091b update to asm-3.3.1, update to new cglib that fixes a bug with bridge methods, add test that verifies the fix works. (previously it worked within Eclipse but not javac because eclipse's compiler wrote out bridge methods differently.)
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1540 d779f126-a31b-0410-b53b-1d3aecad763e
2011-04-20 16:57:24 +00:00
sberlin 1e5fc1daab fix typo, make test not loop forever.
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1510 d779f126-a31b-0410-b53b-1d3aecad763e
2011-02-28 17:49:54 +00:00
sberlin 6e4e4973a8 update stack trace pruning (for AOP-internal methods & generated methods) to include causes.
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1509 d779f126-a31b-0410-b53b-1d3aecad763e
2011-02-28 15:08:01 +00:00
sberlin 82d0fdbec0 rework method interception so that methods that aren't intercepted don't go through cglib, reducing the number of stack frames in most method calls. this has a slight side effect that additional proxy classes are generated for a single class if (and only if) the intercepted methods change. if the intercepted methods remain the same, then the proxy classes will continue to be shared (so things like assistedinject will not blow up the heap).
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1482 d779f126-a31b-0410-b53b-1d3aecad763e
2011-01-18 19:41:12 +00:00
limpbizkit@gmail.com e0f541287d Remove AOP boilerplate from user visible stack traces.
We received complaints because AOP stack traces are difficult to follow. This removes almost everything. The weird thing about this change is that the stack traces contain gaps. Anyone tracing through a stack trace should recognize that proceed() or invoke() means that AOP is in play.

The stack trace of a method that was subject to two interceptors used to look like this:

java.lang.Exception: kaboom!
	at com.publicobject.Interceptable.explode(Interceptable.java:203)
	at com.publicobject.Interceptable$$EnhancerByGuice$$5ffccef9.CGLIB$explode$2(<generated>)
	at com.publicobject.Interceptable$$EnhancerByGuice$$5ffccef9$$FastClassByGuice$$20c8faff.invoke(<generated>)
	at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
	at com.publicobject.InterceptorB.invoke(InterceptorB.java:57)
	at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
	at com.publicobject.InterceptorA.invoke(InterceptorA.java:50)
	at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
	at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
	at com.publicobject.MyTest$Interceptable$$EnhancerByGuice$$5ffccef9.explode(<generated>)
	at com.publicobject.MyTest.testInterceptedMethodThrows(MyTest.java:181)

Now it looks like this:

java.lang.Exception: kaboom!
	at com.publicobject.Interceptable.explode(Interceptable.java:203)
	at com.publicobject.InterceptorB.invoke(InterceptorB.java:57)
	at com.publicobject.InterceptorA.invoke(InterceptorA.java:50)
	at com.publicobject.MyTest.testInterceptedMethodThrows(MyTest.java:181)


git-svn-id: https://google-guice.googlecode.com/svn/trunk@1481 d779f126-a31b-0410-b53b-1d3aecad763e
2011-01-15 07:06:25 +00:00
sberlin b02627d4f5 issue 407 -- better error messaging for failed interception. previously exploded with a ComputationException, now uses a ConfigurationException with a good msg.
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1319 d779f126-a31b-0410-b53b-1d3aecad763e
2010-10-25 04:56:00 +00:00
mcculls 74d714c1e7 Issue 552: (step 1) move core code to its own subdirectory
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1300 d779f126-a31b-0410-b53b-1d3aecad763e
2010-10-21 19:10:16 +00:00