Hi,
I'm not a cglib developer but I worked a lot with it. From as far as I
know, this behavior is "normal". cglib will create a proxy that
extends your class. The annotations are still on the base class but
not on the proxy. That's the same behavior as for any class extending
a class with annotations. If you want to know if a method was
annotated in one of its overrides, you need to loop in the complete
hierarchy.
That said, I can see why this feature could be useful. It makes it
easier to replace the class by its proxy. So some flag
"inheritAnnotations" could be useful. That would means a new java 5
only version of cglib thought.
Hope it helps,
Henri
On Fri, Aug 8, 2008 at 12:06 AM, Oleg Gorobets <
oleg.goro@...> wrote:
> Still no answer till now, developers keep silence about it. Seems like there
> is no other way to contact them but this list. The issue is hidden deep
> inside the code generation logic, so it's better to get even a hint from
> them before investigating. Anyway, if you manage to find the answer on this
> please let me know.
>
> Oleg
>
> Did you ever get an answer to this? We're trying to work around the same
> issue...
>
> Thanks
>
> Mike
>
>
> Oleg Gorobets wrote:
>
>
> Hello all!
>
>
>
> I've encountered a tricky bug in cglib. When creating proxy with callback
> that implements MethodInterceptor the resulted proxy loses all annotations
> on methods. I've created a TestNG test-case to illustrate this (see
> attached
> file). proxyWithMethodCallBack() test will fail when trying to get
> annotation from proxy.
>
>
>
> Does anyone have suggestions on how to fix this?
>
>
>
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
>
http://moblin-contest.org/redirect.php?banner_id=100&url=/> _______________________________________________
> cglib-devel mailing list
>
cglib-devel@...
>
https://lists.sourceforge.net/lists/listinfo/cglib-devel>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
cglib-devel mailing list
cglib-devel@...
https://lists.sourceforge.net/lists/listinfo/cglib-devel