Fix bug accessing polymorphic fields

This commit is contained in:
Grahame Grieve 2022-07-20 11:26:20 +10:00
parent 0fe28f48e0
commit 0bf2ea7551
1 changed files with 5 additions and 2 deletions

View File

@ -360,9 +360,12 @@ public class Element extends Base {
if (childMap == null) {
childMap = new HashMap<>();
for (Element child : children) {
String n = child.getName();
if (n.endsWith("[x]")) {
String n;
if (child.getProperty().getName().endsWith("[x]")) {
n = child.getProperty().getName();
n = n.substring(0, n.length()-3);
} else {
n = child.getName();
}
List<Element> l = childMap.get(n);
if (l == null) {