|
From: Chad B. <cwb...@us...> - 2008-08-29 20:27:03
|
User: cwbrandon
Date: 08/08/29 13:27:14
Modified: andromda-jsf2/src/main/resources/templates/jsf2/utils
FormPopulator.java.vsl
Log:
don't allow null to be set on primitives
Revision Changes Path
1.14 +5 -1 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/utils/FormPopulator.java.vsl
Index: FormPopulator.java.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/utils/FormPopulator.java.vsl,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -w -r1.13 -r1.14
--- FormPopulator.java.vsl 7 Jul 2008 18:21:49 -0000 1.13
+++ FormPopulator.java.vsl 29 Aug 2008 20:27:14 -0000 1.14
@@ -235,8 +235,12 @@
value = org.apache.commons.beanutils.ConvertUtils.convert(propertyAsString, descriptor.getPropertyType());
}
}
+ // - don't attempt to set null on primitive fields
+ if (value != null || !descriptor.getPropertyType().isPrimitive())
+ {
org.apache.commons.beanutils.PropertyUtils.setProperty(form, name, value);
}
+ }
else
{
value = property;
|