Open Source Support Tools
 
Search Item
 
Summary
  Mail Thread
Title: proxy annotation issue
Project: cglib
Item Last Modified: Sun Aug 10 07:58:40 PDT 2008
Tags:  
 
 
MailThread annotation applications based cglib challenge coolest grand great linux list mailing moblin oleg+gorobets org part prize prizes proxy sdk sf.net source sponsored trip win world
Details
proxy annotation issue
4 Messages Collapse AllExpand All
Oleg Gorobets to cglib-devel7 Aug 2008 22:06:15 GMT
[Non-text (text/html) part of message omitted,filename [no filename]]
-------------------------------------------------------------------------
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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/cglib-devel
Mike McCown to cglib-devel7 Aug 2008 21:04:27 GMT
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 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> cglib-devel mailing list
> cglib-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/cglib-devel
>
>

--
View this message in context: http://www.nabble.com/proxy-annotation-issue-tp16608312p18879593.html
Sent from the cgLib - Dev mailing list archive at Nabble.com.


-------------------------------------------------------------------------
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=/


Oleg Gorobets to cglib-devel10 Apr 2008 11:09:32 GMT
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?


[Non-text (text/html) part of message omitted,filename [no filename]]
[Non-text (application/octet-stream) part of message omitted,filename EnhancerTests.java]
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
cglib-devel mailing list
cglib-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/cglib-devel
Henri Tremblay to cglib-devel10 Aug 2008 14:58:40 GMT
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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> 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=/