Commit Graph
5 Commits
Author SHA1 Message Date
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