Fixed getTypeName

This commit is contained in:
Luca Frosini 2023-04-21 14:30:07 +02:00
parent a2b7311ba0
commit 8f67beb172
1 changed files with 1 additions and 4 deletions

View File

@ -309,16 +309,13 @@ public abstract class ElementManagement<El extends OElement, T extends Type> {
public String getTypeName() throws NotFoundException, AvailableInAnotherContextException, ResourceRegistryException { public String getTypeName() throws NotFoundException, AvailableInAnotherContextException, ResourceRegistryException {
if(typeName==null) { if(typeName==null) {
if(element!=null) { if(element!=null) {
typeName = element.getProperty(Element.CLASS_PROPERTY); typeName = getOClass().getName();
} }
if(typeName==null && jsonNode!=null) { if(typeName==null && jsonNode!=null) {
this.typeName = getClassProperty(jsonNode); this.typeName = getClassProperty(jsonNode);
} }
if(typeName==null) {
typeName = getOClass().getName();
}
} }
return typeName; return typeName;
} }