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,8 +776,10 @@ public class DataPropertyDaoJena extends PropertyDaoJena implements
|
|||
Resource resource = sol.getResource("property");
|
||||
String uri = resource.getURI();
|
||||
DataProperty property = getDataPropertyByURI(uri);
|
||||
if (property != null) {
|
||||
properties.add(property);
|
||||
}
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
|
|
@ -894,8 +894,10 @@ public class ObjectPropertyDaoJena extends PropertyDaoJena implements ObjectProp
|
|||
String uri = resource.getURI();
|
||||
log.debug("Found populated object property " + uri);
|
||||
ObjectProperty property = getObjectPropertyByURI(uri);
|
||||
if (property != null) {
|
||||
properties.add(property);
|
||||
}
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue