Author: doogie
Date: Tue Jun 15 16:41:21 2010
New Revision: 954958
URL:
http://svn.apache.org/viewvc?rev=954958&view=revLog:
Applied fix from trunk for revision: 954956
Modified:
ofbiz/branches/release4.0/ (props changed)
ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/condition/EntityFunction.java
ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java
Propchange: ofbiz/branches/release4.0/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun 15 16:41:21 2010
@@ -1 +1 @@
-/ofbiz/trunk:539836-539837,618970,627900,629279,674173,676162,676227,676246,679704,690644,705862,706035,706055,706067,706692,721839,721887,728935,737443,738870,741491,808792,814731,827730,890245,942884,943168
+/ofbiz/trunk:539836-539837,618970,627900,629279,674173,676162,676227,676246,679704,690644,705862,706035,706055,706067,706692,721839,721887,728935,737443,738870,741491,808792,814731,827730,890245,942884,943168,954956
Modified: ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/condition/EntityFunction.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/condition/EntityFunction.java?rev=954958&r1=954957&r2=954958&view=diff==============================================================================
--- ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/condition/EntityFunction.java (original)
+++ ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/condition/EntityFunction.java Tue Jun 15 16:41:21 2010
@@ -94,8 +94,6 @@ public abstract class EntityFunction ext
codeString = code;
if (value instanceof EntityConditionValue) {
this.nested = (EntityConditionValue) value;
- } else if (value instanceof String) {
- this.value = ((String) value).replaceAll("'", "''");
} else {
this.value = value;
}
Modified: ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java?rev=954958&r1=954957&r2=954958&view=diff==============================================================================
--- ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java (original)
+++ ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java Tue Jun 15 16:41:21 2010
@@ -826,7 +826,13 @@ public class SqlJdbcUtil {
if (field != null) {
buffer.append('?');
} else {
- buffer.append('\'').append(value).append('\'');
+ buffer.append('\'');
+ if (value instanceof String) {
+ buffer.append(((String) value).replaceAll("'", "''"));
+ } else {
+ buffer.append(value);
+ }
+ buffer.append('\'');
}
if (field != null && params != null) params.add(new EntityConditionParam(field, value));
}