Fixed: Bypass Java GString to String conversion in ObjectType::simpleTypeOrObjectConvert (OFBIZ-12182)

Follows https://markmail.org/message/azn7e4g2rbpo7tvj

Conflicts handled by hand
 framework/base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java
This commit is contained in:
Jacques Le Roux
2021-02-19 09:38:50 +01:00
parent 7add713a10
commit a0b2f55b40
@@ -508,13 +508,12 @@ public class ObjectType {
if (obj == null || UtilValidate.isEmpty(type) || "Object".equals(type) || "java.lang.Object".equals(type)) {
return obj;
}
if ("PlainString".equals(type)) {
if ("PlainString".equals(type)
|| ("org.codehaus.groovy.runtime.GStringImpl".equals(obj.getClass().getName()) && "String".equals(type))) {
return obj.toString();
}
if (obj instanceof Node) {
Node node = (Node) obj;
String nodeValue = node.getTextContent();
if (nodeValue == null) {