You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2012/04/29 23:02:53 UTC

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

Author: jleroux
Date: Sun Apr 29 21:02:53 2012
New Revision: 1331996

URL: http://svn.apache.org/viewvc?rev=1331996&view=rev
Log:
https://issues.apache.org/jira/browse/OFBIZ-4602 "Null values are not synchronized in http mode"

This is not a complete solution and induces more problem than it solves (notably in RuntimeData for jobs), to be continued...

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=1331996&r1=1331995&r2=1331996&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Sun Apr 29 21:02:53 2012
@@ -461,7 +461,7 @@ public class GenericEntity extends Obser
         }
 
         boolean isNullString = false;
-        if ("null".equals(value) || "[null-field]".equals(value)) {
+        if ("null".equals(value) || "[null-field]".equals(value)) { // keep [null-field] but it'not used now
             // count this as a null too, but only for numbers and stuff, not for Strings
             isNullString = true;
         }
@@ -1078,8 +1078,8 @@ public class GenericEntity extends Obser
                 } else {
                     element.setAttribute(name, value);
                 }
-            } else {
-                element.setAttribute(name, GenericEntity.NULL_FIELD.toString());
+                // } else {
+                // element.setAttribute(name, GenericEntity.NULL_FIELD.toString());
             }
         }
 
@@ -1132,15 +1132,9 @@ public class GenericEntity extends Obser
                     // check each character, if line-feed or carriage-return is found set needsCdata to true; also look for invalid characters
                     for (int i = 0; i < value.length(); i++) {
                         char curChar = value.charAt(i);
-                        /* Some common character for these invalid values, have seen these are mostly from MS Word, but may be part of some standard:
-                         5 = ...
-                         18 = apostrophe
-                         19 = left quotation mark
-                         20 = right quotation mark
-                         22 = –
-                         23 = -
-                         25 = tm
-                         *
+                        /*
+                         * Some common character for these invalid values, have seen these are mostly from MS Word, but may be part of some standard:
+                         * 5 = ... 18 = apostrophe 19 = left quotation mark 20 = right quotation mark 22 = – 23 = - 25 = tm
                          */
 
                         switch (curChar) {