Status: New
Owner: ----
New issue 711 by taharqa: Bindings fails silenciously instead of raising
exception on certains aop configuration
http://code.google.com/p/google-guice/issues/detail?id=711
Description of the issue:
I spent hours to figure out that putting interceptors around class that
does not have any interface won't have the interceptor intercep nor the
Binding mechanism indicate an error at least at runtime.
Steps to reproduce:
1. Take the AOP sample http://code.google.com/p/google-guice/wiki/AOP
2. Remove "implements BillingService" to RealBillingService
3. Adapt the module to inject
// module code
bind(RealBillingService.class).toInstance(new RealBillingService
());
bindInterceptor(Matchers.any(),
Matchers.annotatedWith(NotOnWeekends.class), new WeekendBlocker());
// Launcher code
Injector i = Guice.createInjector(new NotOnWeekendsModule());
RealBillingService bs = i.getInstance(RealBillingService.class);
bs.chargeOrder("", ""); // <== here no interception, no error
4. Run and see no interception
Here we might at least an error or something runtime indicating no
interception occurs.
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to google-guice-dev@googlegroups.com.
To unsubscribe from this group, send email to
google-guice-dev+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en.