You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2009/04/27 15:52:31 UTC

svn commit: r768984 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

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() + "]";