solved bug on instantiation error for types that are not in the model
This commit is contained in:
parent
24576cd30f
commit
147e8a8961
|
@ -7,6 +7,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
import org.gcube.common.storagehub.model.annotations.RootNode;
|
||||
import org.gcube.common.storagehub.model.items.Item;
|
||||
import org.gcube.common.storagehub.model.items.RootItem;
|
||||
import org.reflections.Reflections;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -51,7 +52,7 @@ public class ClassHandler {
|
|||
|
||||
public Class<? extends RootItem> get(String nodeType){
|
||||
if (classMap.containsKey(nodeType)) return classMap.get(nodeType);
|
||||
if (deprecatedNode.contains(nodeType)) return RootItem.class;
|
||||
if (deprecatedNode.contains(nodeType)) return Item.class;
|
||||
return null;
|
||||
//throw new RuntimeException("mapping not found for nodetype "+ nodeType);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue