[jboss-user] [JBoss Microcontainer Development] New message: "Re: JBREFLECT-5 - Implementing generics in JavassistClassInfo"
Kabir Khan
do-not-reply at jboss.com
Wed Mar 17 11:51:44 EDT 2010
User development,
A new message was posted in the thread "JBREFLECT-5 - Implementing generics in JavassistClassInfo":
http://community.jboss.org/message/532580#532580
Author : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com
Message:
--------------------------------------------------------------
Trying to run the kernel tests with the jboss-reflect snapshot and javassist implementation with security disabled results in loads of failures. A lot of these seem to be due to BeanInfo never having been tested with the Javassist implementation, and fall into the following categories:
* PropertyInfo.getUnderlyingAnnotation() is not working properly w/ Javassist so we get problems in jbossxb since the @XmlTransient annotation is not read
* I need to dig in properly, but it seems that when configuring Collection/Map/Array properties, the individual elements are null rather than containing the expected values
* There might be more
I am currently creating Javassist versions of the org.jboss.test.beaninfo.test.* tests and fixing what comes up. The first thing I found is that when creating property infos for things like
public class BeanInfoGenericInconsistentTypes
{
public BeanInfoGenericClass<String> getSomething()
{
return null;
}
public void setSomething(BeanInfoGenericClass<Integer> x)
{
}
}
With the Javassist implementation the 'something' property gets both a getter and a setter, while with introspection it gets only a getter. The code that determines this is this in AbstractBeanInfoFactory.getBeanProperties():
TypeInfo pinfo = thisSetter.getParameterTypes()[0];
if (getter.getReturnType().equals(pinfo) == true)
The introspection implementation returns ParameterizedClassInfos containing the generic information for the parameter and return types, so it looks like I will need to implement that for javassist anyway.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/532580#532580
More information about the jboss-user
mailing list