[jboss-user] [JBoss Microcontainer Development] New message: "Re: JBREFLECT-5 - Implementing generics in JavassistClassInfo"

Ales Justin do-not-reply at jboss.com
Thu Mar 11 05:37:48 EST 2010


User development,

A new message was posted in the thread "JBREFLECT-5 - Implementing generics in JavassistClassInfo":

http://community.jboss.org/message/531337#531337

Author  : Ales Justin
Profile : http://community.jboss.org/people/alesj

Message:
--------------------------------------------------------------
>  
>  
>  
>  
> I have not added caching yet, and adding this simple test passes with the introspection implementation, but fails with the Javassist implementation
>  
>    *public* Comparable<String> signatureCachedParameterizedClassInfo()
>    {
>       *return* *null*;
>    }
>    
>    *public* *void* testCachedParameterizedClassInfo() *throws* Throwable
>    {
>       Type type = getGenericReturnType("signatureCachedParameterizedClassInfo");
>       TypeInfo typeInfo1 = getTypeInfoFactory().getTypeInfo(type);
>       TypeInfo typeInfo2 = getTypeInfoFactory().getTypeInfo(getGenericReturnType("signatureCachedParameterizedClassInfo"));
>       assertEquals(typeInfo1, typeInfo2);
>       assertSame(typeInfo1, typeInfo2);  // <-- FAILS
>  
>       //Also check the results of repeated calls to getGenericSuperClass/-Interfaces() etc.
>    }
> 
> 
>  
> 
> Is this object equality a requirement? My fear is that working out the key will be costly
My first answer is yes, but you can convince we otherwise. ;-)
 
As all of the stuff in Reflect works this was, why is this here a problem?

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/531337#531337




More information about the jboss-user mailing list