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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user