Fixed method
This commit is contained in:
parent
010e62f4fa
commit
941b47eb14
|
@ -13,7 +13,10 @@ import org.gcube.informationsystem.types.TypeMapper;
|
|||
public class TypeUtility {
|
||||
|
||||
public static String getTypeName(JsonNode jsonNode){
|
||||
return jsonNode.get(Element.CLASS_PROPERTY).asText();
|
||||
if(jsonNode.has(Element.CLASS_PROPERTY)) {
|
||||
return jsonNode.get(Element.CLASS_PROPERTY).asText();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getTypeName(String json) throws JsonProcessingException, IOException{
|
||||
|
|
Loading…
Reference in New Issue