"alex.loubyansky(a)jboss.com" wrote :
| The issue is actually with jboss-reflect. Apparently,
propertyInfo.getUnderlyingAnnotation(annotationType) doesn't work for
'is'-methods (i.e. it returns null even if the method is annotated).
Nope, not a Reflect issue.
It's by the spec, that only primitive boolean' getter should be isX,
where as in this case - with Boolean - it should be getX.
| public class AbstractBeanInfoFactory implements BeanInfoFactory
| {
| /** The cache */
| protected Map<ClassLoader, Map<ClassInfo, Map<BeanAccessMode,
BeanInfo>>> cache = new WeakHashMap<ClassLoader, Map<ClassInfo,
Map<BeanAccessMode, BeanInfo>>>();
|
| protected static boolean isGetter(MethodInfo minfo)
| {
| String name = minfo.getName();
| TypeInfo returnType = minfo.getReturnType();
| TypeInfo[] parameters = minfo.getParameterTypes();
| if ((name.length() > 3 && name.startsWith("get")) ||
(name.length() > 2 && name.startsWith("is")))
| {
| // isBoolean() is not a getter for java.lang.Boolean
| if (name.startsWith("is") &&
PrimitiveInfo.BOOLEAN.equals(returnType) == false)
| return false;
| if (parameters.length == 0 && PrimitiveInfo.VOID.equals(returnType)
== false)
| return true;
| }
| return false;
| }
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241699#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...