If the value to inject does not exist, Seam tries to set the primitive to null.
A simple fix might be included in the Reflections.set method:
| public static void set(Field field, Object target, Object value) throws Exception
| {
| if (value == null && field.getClass().isPrimitive()) return;
|
However, I suppose this does slightly change the injection semantics of stateful
components - perhaps the field should be set to the default value for that primitive (i.e.
false for boolean, zero for everything else).
What do people think?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990808#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...