From 1b51e75970e27c473c4b42cfe4f7d1adaa1dd94e Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 1 Nov 2022 23:46:49 +0100 Subject: [PATCH] [DEV] update from aknot --- src/org/atriasoft/exml/XmlMapper.java | 2 +- src/org/atriasoft/exml/builder/IntrospectionObject.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/org/atriasoft/exml/XmlMapper.java b/src/org/atriasoft/exml/XmlMapper.java index e4e8f56..172a9a0 100644 --- a/src/org/atriasoft/exml/XmlMapper.java +++ b/src/org/atriasoft/exml/XmlMapper.java @@ -84,7 +84,7 @@ public class XmlMapper { final IntrospectionObject introspectionObject = (IntrospectionObject) parser.parse(data, property); introspectionObject.generateTheObject(); final Object listRet = introspectionObject.getData(); - if (listRet != null && !listRet.getClass().isArray() && listRet.getClass().componentType() == classType) { + if (listRet != null && !listRet.getClass().isArray() && listRet.getClass() == classType) { return (T) listRet; } else if (listRet != null && listRet.getClass().isArray() && listRet.getClass().componentType() == classType) { final T[] tmp = (T[]) listRet; diff --git a/src/org/atriasoft/exml/builder/IntrospectionObject.java b/src/org/atriasoft/exml/builder/IntrospectionObject.java index 2cd6343..be7216b 100644 --- a/src/org/atriasoft/exml/builder/IntrospectionObject.java +++ b/src/org/atriasoft/exml/builder/IntrospectionObject.java @@ -80,7 +80,7 @@ public class IntrospectionObject { + (this.modelInterface.isList() ? "[List]" : "")); Log.warning(" Properties : " + this.properties.keySet()); Log.warning(" Nodes : " + this.nodes.keySet()); - this.data = this.modelInterface.createObject(this.properties, this.nodes); + this.data = this.modelInterface.createObject(this.properties, this.nodes, false); } public Object getData() { @@ -96,7 +96,7 @@ public class IntrospectionObject { if (beanName == null) { throw new ExmlNodeDoesNotExist("The node '" + nodeName + "' Does not exist..."); } - return this.modelInterface.getTreeNameOfSubNode(beanName); + return this.modelInterface.getTreeNameOfSubNode(beanName, false); } public Class getTypeOfProperty(final String nodeName) throws AknotException, ExmlNodeDoesNotExist { @@ -118,7 +118,7 @@ public class IntrospectionObject { if (beanName == null) { throw new ExmlNodeDoesNotExist("The node '" + nodeName + "' Does not exist..."); } - return this.modelInterface.getTypeOfSubNode(beanName); + return this.modelInterface.getTypeOfSubNode(beanName, false); } public Class getTypeOfSubNodeSubType(final String nodeName) throws AknotException, ExmlNodeDoesNotExist { @@ -126,7 +126,7 @@ public class IntrospectionObject { if (beanName == null) { throw new ExmlNodeDoesNotExist("The node '" + nodeName + "' Does not exist..."); } - return this.modelInterface.getTypeOfSubNodeList(beanName); + return this.modelInterface.getTypeOfSubNodeList(beanName, false); } public Class getTypeOfSubProperty(final String nodeName) throws AknotException, ExmlNodeDoesNotExist {