From fe56093224e1f922dbc15f43d08583f8872cc923 Mon Sep 17 00:00:00 2001 From: "Ariel D. Moya Sequeira" Date: Mon, 20 Jun 2016 15:05:02 -0600 Subject: [PATCH] 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. --- .../cornell/mannlib/vitro/webapp/dao/jena/IndividualSDB.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualSDB.java b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualSDB.java index 34610905a..f4ebc4270 100644 --- a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualSDB.java +++ b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualSDB.java @@ -508,7 +508,7 @@ public class IndividualSDB extends IndividualImpl implements Individual { dataset.getLock().enterCriticalSection(Lock.READ); try { String valuesOfProperty = - "SELECT ?object" + + "SELECT ?object " + "WHERE{ <" + this.individualURI + "> <" + propertyURI + "> ?object } \n"; ResultSet values = QueryExecutionFactory.create(