svn commit: r1850028 - in /ofbiz/ofbiz-framework/trunk/framework: common/src/main/java/org/apache/ofbiz/common/preferences/ service/src/main/java/org/apache/ofbiz/service/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1850028 - in /ofbiz/ofbiz-framework/trunk/framework: common/src/main/java/org/apache/ofbiz/common/preferences/ service/src/main/java/org/apache/ofbiz/service/

jleroux@apache.org
Author: jleroux
Date: Mon Dec 31 09:25:59 2018
New Revision: 1850028

URL: http://svn.apache.org/viewvc?rev=1850028&view=rev
Log:
Improved: function parseBigDecimalForEntity is in wrong location
(OFBIZ-10689)

Missed those in previous commit

Modified:
    ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceServices.java
    ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceWorker.java
    ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelParam.java

Modified: ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceServices.java?rev=1850028&r1=1850027&r2=1850028&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceServices.java Mon Dec 31 09:25:59 2018
@@ -175,7 +175,7 @@ public class PreferenceServices {
 
         try {
             if (UtilValidate.isNotEmpty(userPrefDataType)) {
-                userPrefValue = ObjectType.simpleTypeConvert(userPrefValue, userPrefDataType, null, null, false);
+                userPrefValue = ObjectType.simpleTypeOrObjectConvert(userPrefValue, userPrefDataType, null, null, false);
             }
             GenericValue rec = delegator.makeValidValue("UserPreference", PreferenceWorker.toFieldMap(userLoginId, userPrefTypeId, userPrefGroupTypeId, userPrefValue));
             delegator.createOrStore(rec);

Modified: ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceWorker.java?rev=1850028&r1=1850027&r2=1850028&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceWorker.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceWorker.java Mon Dec 31 09:25:59 2018
@@ -66,7 +66,7 @@ public final class PreferenceWorker {
             // default to String
             userPrefMap.put(rec.getString("userPrefTypeId"), rec.getString("userPrefValue"));
         } else {
-            userPrefMap.put(rec.getString("userPrefTypeId"), ObjectType.simpleTypeConvert(rec.get("userPrefValue"), prefDataType, null, null, false));
+            userPrefMap.put(rec.getString("userPrefTypeId"), ObjectType.simpleTypeOrObjectConvert(rec.get("userPrefValue"), prefDataType, null, null, false));
         }
         return userPrefMap;
     }
@@ -253,7 +253,7 @@ public final class PreferenceWorker {
      * @return field map
      */
     public static Map<String, Object> toFieldMap(String userLoginId, String userPrefTypeId, String userPrefGroupTypeId, Object userPrefValue) throws GeneralException {
-        Map<String, Object> fieldMap = UtilMisc.toMap("userLoginId", userLoginId, "userPrefTypeId", userPrefTypeId, "userPrefValue", ObjectType.simpleTypeConvert(userPrefValue, "String", null, null, false));
+        Map<String, Object> fieldMap = UtilMisc.toMap("userLoginId", userLoginId, "userPrefTypeId", userPrefTypeId, "userPrefValue", ObjectType.simpleTypeOrObjectConvert(userPrefValue, "String", null, null, false));
         if (UtilValidate.isNotEmpty(userPrefGroupTypeId)) {
             fieldMap.put("userPrefGroupTypeId", userPrefGroupTypeId);
         }

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelParam.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelParam.java?rev=1850028&r1=1850027&r2=1850028&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelParam.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelParam.java Mon Dec 31 09:25:59 2018
@@ -182,7 +182,7 @@ public class ModelParam implements Seria
         Object defaultValueObj = null;
         if (this.type != null) {
             try {
-                defaultValueObj = ObjectType.simpleTypeConvert(this.defaultValue, this.type, null, null, false);
+                defaultValueObj = ObjectType.simpleTypeOrObjectConvert(this.defaultValue, this.type, null, null, false);
             } catch (Exception e) {
                 Debug.logWarning(e, "Service attribute [" + name + "] default value could not be converted to type [" + type + "]: " + e.toString(), module);
             }