NIHVIVO-2216 Check that return value of getDataPropertyByURI() / getObjectPropertyByURI() is not null before adding to the list of properties returned by getDataPropertyList() / getObjectPropertyList().
This commit is contained in:
parent
38fe2c7083
commit
cc1b8a2579
2 changed files with 6 additions and 2 deletions
|
@ -776,7 +776,9 @@ public class DataPropertyDaoJena extends PropertyDaoJena implements
|
||||||
Resource resource = sol.getResource("property");
|
Resource resource = sol.getResource("property");
|
||||||
String uri = resource.getURI();
|
String uri = resource.getURI();
|
||||||
DataProperty property = getDataPropertyByURI(uri);
|
DataProperty property = getDataPropertyByURI(uri);
|
||||||
properties.add(property);
|
if (property != null) {
|
||||||
|
properties.add(property);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return properties;
|
return properties;
|
||||||
}
|
}
|
||||||
|
|
|
@ -894,7 +894,9 @@ public class ObjectPropertyDaoJena extends PropertyDaoJena implements ObjectProp
|
||||||
String uri = resource.getURI();
|
String uri = resource.getURI();
|
||||||
log.debug("Found populated object property " + uri);
|
log.debug("Found populated object property " + uri);
|
||||||
ObjectProperty property = getObjectPropertyByURI(uri);
|
ObjectProperty property = getObjectPropertyByURI(uri);
|
||||||
properties.add(property);
|
if (property != null) {
|
||||||
|
properties.add(property);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return properties;
|
return properties;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue