SPARQL query fix in IndividualSDB class

This fixes an SPARQL query found in the IndividualSDB class, which triggers `NullPointerException`s when trying to use individuals retrieved using the `getRelatedIndividuals()` method. The defect was observed in the Vitro 1.8 release branch.

After fixing this, the `Individual` instances returned by the aforementioned method work correctly.
This commit is contained in:
Ariel D. Moya Sequeira 2016-06-20 15:05:02 -06:00 committed by GitHub
parent c87a66c949
commit fe56093224

View file

@ -508,7 +508,7 @@ public class IndividualSDB extends IndividualImpl implements Individual {
dataset.getLock().enterCriticalSection(Lock.READ); dataset.getLock().enterCriticalSection(Lock.READ);
try { try {
String valuesOfProperty = String valuesOfProperty =
"SELECT ?object" + "SELECT ?object " +
"WHERE{ <" + this.individualURI + "> <" + "WHERE{ <" + this.individualURI + "> <" +
propertyURI + "> ?object } \n"; propertyURI + "> ?object } \n";
ResultSet values = QueryExecutionFactory.create( ResultSet values = QueryExecutionFactory.create(