Author: lektran
Date: Mon Apr 27 13:52:31 2009
New Revision: 768984

URL: http://svn.apache.org/viewvc?rev=768984&view=rev
Log:
Allow GenericEntity.NULL values through without warnings

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=768984&r1=768983&r2=768984&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java 
(original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Mon 
Apr 27 13:52:31 2009
@@ -402,7 +402,7 @@
                 } catch (GenericNotImplementedException e) {
                     throw new IllegalArgumentException(e.getMessage());
                 }
-            } else if (value != null) {
+            } else if (value != null && !(value instanceof NULL)) {
                 // make sure the type matches the field Java type
                 if (!ObjectType.instanceOf(value, type.getJavaType())) {
                     String errMsg = "In entity field [" + this.getEntityName() 
+ "." + name + "] set the value passed in [" + value.getClass().getName() + "] 
is not compatible with the Java type of the field [" + type.getJavaType() + "]";


Reply via email to