Checking how KernelDeployment handles BeanMetaDataFactorys I came with the following
issue:
-
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191432#...
I guess CollectionPropertyHandler could include this check
| if (child != null)
| {
| TypeInfo typeInfo = propertyInfo.getType();
| if (typeInfo instanceof ClassInfo)
| {
| ClassInfo classInfo = (ClassInfo)typeInfo;
| TypeInfo componentType = classInfo.getComponentType();
| if (componentType != null)
| {
| TypeInfoFactory tif = componentType.getTypeInfoFactory();
| TypeInfo childTypeInfo = tif.getTypeInfo(child.getClass());
| if (componentType.isAssignableFrom(childTypeInfo) == false)
| throw new IllegalArgumentException("Illegal child type");
| }
| }
| }
|
probably in a bit more optimized way - not checking for component type every time.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191434#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...