Updates:
        Status: Duplicate
        Mergedinto: 252

Comment #1 on issue 640 by sberlin: Interceptors are matched incorrectly when there are generics involved
http://code.google.com/p/google-guice/issues/detail?id=640

You'll note that Guice is printing out a warning here, telling you that it can intercept the method twice. Java actually produces to different methods here -- one is synthetic and delegates to the other -- in order for things to work under the covers. So Guice is intercepting both. It's unfortunately very difficult for Guice itself to do the right thing here, because it's difficult to figure out if you want to intercept just the generic signature, the base signature, or both.

You can force Guice to do the (most likely) right thing by adding a custom method matcher that returns false if the method is synthetic (Method.isSynthetic). Something like new MyMatcher().and(Matchers.noSynthetics()).

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en.

Reply via email to