Author: jonesde Date: Sat Nov 18 00:38:09 2006 New Revision: 476472 URL: http://svn.apache.org/viewvc?view=rev&rev=476472 Log: Some formatting fixes in the code from Fabian Gorsler in Jira #OFBIZ-453
Modified: incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Modified: incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java?view=diff&rev=476472&r1=476471&r2=476472 ============================================================================== --- incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original) +++ incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Sat Nov 18 00:38:09 2006 @@ -1052,13 +1052,13 @@ // if it is less that 0x20 at this point it is invalid because the only valid values < 0x20 are 0x9, 0xA, 0xD as caught above Debug.logInfo("Removing invalid character [" + curChar + "] numeric value [" + (int) curChar + "] for field " + name + " of entity with PK: " + this.getPrimaryKey().toString(), module); value.deleteCharAt(i); - }else if(curChar > 0x7F) { - // Replace each char which is out of the ASCII range with a XML entity - String replacement = "&#" + (int) curChar + ";"; - if(Debug.verboseOn()) { - Debug.logVerbose("Entity: "+ this.getEntityName() +", PK: " + this.getPrimaryKey().toString() +" -> char ["+ curChar +"] replaced with ["+ replacement +"]", module); - } - value.replace(i, i+1, replacement); + } else if(curChar > 0x7F) { + // Replace each char which is out of the ASCII range with a XML entity + String replacement = "&#" + (int) curChar + ";"; + if (Debug.verboseOn()) { + Debug.logVerbose("Entity: " + this.getEntityName() + ", PK: " + this.getPrimaryKey().toString() + " -> char [" + curChar + "] replaced with [" + replacement + "]", module); + } + value.replace(i, i+1, replacement); } } }