"scott.stark(a)jboss.org" wrote : This is implemented in the metavalue project
now.
I think you are again doing it wrong, as with SimpleMetaValueComparator.
You should add this info to SimpleMetaType.
As you have all the info required in AbstractInstanceClassFactory::setValue.
| protected void setValue(BeanInfo beanInfo, PropertyInfo propertyInfo, Object
object, Object unwrapValue)
| throws Throwable
| {
| TypeInfo type = propertyInfo.getType();
| if(unwrapValue == null && type.isPrimitive())
| {
| MetaType metaType = MetaTypeFactory.getInstance().resolve(type);
| SimpleMetaType smt = SimpleMetaType.class.cast(metaType);
| unwrapValue = smt.getDefaultValue(); // <-- missing method
| }
| propertyInfo.set(object, unwrapValue);
| }
|
More OO.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191439#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...