Improved: function parseBigDecimalForEntity is in wrong location
(OFBIZ-10689) Actually this is a firts step that simply renames ObjectType::simpleTypeConvert to ObjectType::simpleTypeOrObjectConvert and improves the simpleTypeOrObjectConvert Javadoc Thanks: Pierre Smits for report, Deepak Dixit for discussion git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850027 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+2
-2
@@ -180,7 +180,7 @@ public final class SetCalendar extends MethodOperation {
|
||||
int millis = 0;
|
||||
try {
|
||||
if (!this.localeFse.isEmpty()) {
|
||||
locale = (Locale) ObjectType.simpleTypeConvert(this.localeFse.expand(methodContext.getEnvMap()), "Locale", null, null);
|
||||
locale = (Locale) ObjectType.simpleTypeOrObjectConvert(this.localeFse.expand(methodContext.getEnvMap()), "Locale", null, null);
|
||||
}
|
||||
if (locale == null) {
|
||||
locale = methodContext.getLocale();
|
||||
@@ -189,7 +189,7 @@ public final class SetCalendar extends MethodOperation {
|
||||
locale = Locale.getDefault();
|
||||
}
|
||||
if (!this.timeZoneFse.isEmpty()) {
|
||||
timeZone = (TimeZone) ObjectType.simpleTypeConvert(this.timeZoneFse.expand(methodContext.getEnvMap()), "TimeZone", null, null);
|
||||
timeZone = (TimeZone) ObjectType.simpleTypeOrObjectConvert(this.timeZoneFse.expand(methodContext.getEnvMap()), "TimeZone", null, null);
|
||||
}
|
||||
if (timeZone == null) {
|
||||
timeZone = methodContext.getTimeZone();
|
||||
|
||||
@@ -74,7 +74,7 @@ public class Convert extends SimpleMapOperation {
|
||||
}
|
||||
Object convertedObject = null;
|
||||
try {
|
||||
convertedObject = ObjectType.simpleTypeConvert(fieldObject, type, format, locale);
|
||||
convertedObject = ObjectType.simpleTypeOrObjectConvert(fieldObject, type, format, locale);
|
||||
} catch (GeneralException e) {
|
||||
addMessage(messages, loader, locale);
|
||||
Debug.logError(e, "Error in convert simple-map-processor operation: " + e.toString(), module);
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ public class InFieldOper extends MakeInStringOperation {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return (String) ObjectType.simpleTypeConvert(obj, "String", null, locale);
|
||||
return (String) ObjectType.simpleTypeOrObjectConvert(obj, "String", null, locale);
|
||||
} catch (GeneralException e) {
|
||||
Debug.logWarning(e, module);
|
||||
messages.add("Error converting incoming field \"" + fieldName + "\" in map processor: " + e.getMessage());
|
||||
|
||||
@@ -56,7 +56,7 @@ public class Regexp extends SimpleMapOperation {
|
||||
Object obj = inMap.get(fieldName);
|
||||
String fieldValue = null;
|
||||
try {
|
||||
fieldValue = (String) ObjectType.simpleTypeConvert(obj, "String", null, locale);
|
||||
fieldValue = (String) ObjectType.simpleTypeOrObjectConvert(obj, "String", null, locale);
|
||||
} catch (GeneralException e) {
|
||||
messages.add("Could not convert field value for comparison: " + e.getMessage());
|
||||
return;
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ public class ValidateMethod extends SimpleMapOperation {
|
||||
Object obj = inMap.get(fieldName);
|
||||
String fieldValue = null;
|
||||
try {
|
||||
fieldValue = (String) ObjectType.simpleTypeConvert(obj, "String", null, locale);
|
||||
fieldValue = (String) ObjectType.simpleTypeOrObjectConvert(obj, "String", null, locale);
|
||||
} catch (GeneralException e) {
|
||||
messages.add("Could not convert field value for comparison: " + e.getMessage());
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user