When we configure a route we specify a target class and a target method like this:

routeDescriptor.to(SampleController.class).index();

Now, the to() method will create a cglib interceptor for the class (SampleController in this case):

Object o = Enhancer.create(clazz, new MyMethodInterceptor(this));

So, all call calls to instances of clazz will be intercepted by MyMethodInterceptor. This is usually fine and works but there is window of oppertunity that after the configuration() method on AbstractRouteBuilder has been called and before DefaultRouter calls build() on the RoutingModule, that the finalizer thread executes invoking finalize. When this happens these calls are intercepted by our MyMethodInterceptor hence setting the targetMethods to finalize().
We could add a CallbackFilter implementation when creating the interceptor:

Object o = Enhancer.create(clazz, null, FINALIZE_FILTER, new Callback[] {new MyMethodInterceptor(this), NoOp.INSTANCE});

This will filter the calls to finalize.
I've to this working and tested but will hold off with a PR until we have master sorted.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira