Skip to content

Commit 05689ea

Browse files
committed
GH-5691 CLI for running and storing query explanations
1 parent 1b1ca26 commit 05689ea

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

core/queryresultio/sparqljson/src/main/java/org/eclipse/rdf4j/query/resultio/sparqljson/AbstractSPARQLJSONParser.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -564,10 +564,8 @@ private JsonFactory configureNewJsonFactory() {
564564
builder.configure(JsonReadFeature.ALLOW_TRAILING_COMMA,
565565
getParserConfig().get(JSONSettings.ALLOW_TRAILING_COMMA));
566566
}
567-
if (getParserConfig().isSet(JSONSettings.INCLUDE_SOURCE_IN_LOCATION)) {
568-
builder.configure(StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION,
569-
getParserConfig().get(JSONSettings.INCLUDE_SOURCE_IN_LOCATION));
570-
}
567+
builder.configure(StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION,
568+
getParserConfig().get(JSONSettings.INCLUDE_SOURCE_IN_LOCATION));
571569
if (getParserConfig().isSet(JSONSettings.STRICT_DUPLICATE_DETECTION)) {
572570
builder.configure(StreamReadFeature.STRICT_DUPLICATE_DETECTION,
573571
getParserConfig().get(JSONSettings.STRICT_DUPLICATE_DETECTION));

core/queryresultio/sparqljson/src/test/java/org/eclipse/rdf4j/query/resultio/sparqljson/SPARQLJSONParserCustomTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ public void testIncludeSourceLocationDefault() throws Exception {
356356
assertTrue(e.getCause() instanceof JsonProcessingException);
357357
JsonProcessingException cause = (JsonProcessingException) e.getCause();
358358
assertEquals(2, cause.getLocation().getLineNr());
359-
assertEquals(2, cause.getLocation().getColumnNr());
359+
assertEquals(1, cause.getLocation().getColumnNr());
360360
assertNotEquals(ContentReference.unknown(), cause.getLocation().contentReference());
361361
assertEquals(source, cause.getLocation().contentReference().getRawContent());
362362
}
@@ -374,7 +374,7 @@ public void testIncludeSourceLocationEnabled() throws Exception {
374374
assertTrue(e.getCause() instanceof JsonProcessingException);
375375
JsonProcessingException cause = (JsonProcessingException) e.getCause();
376376
assertEquals(2, cause.getLocation().getLineNr());
377-
assertEquals(2, cause.getLocation().getColumnNr());
377+
assertEquals(1, cause.getLocation().getColumnNr());
378378
assertNotEquals(ContentReference.unknown(), cause.getLocation().contentReference());
379379
assertEquals(source, cause.getLocation().contentReference().getRawContent());
380380
}
@@ -391,7 +391,7 @@ public void testIncludeSourceLocationDisabled() throws Exception {
391391
assertTrue(e.getCause() instanceof JsonProcessingException);
392392
JsonProcessingException cause = (JsonProcessingException) e.getCause();
393393
assertEquals(2, cause.getLocation().getLineNr());
394-
assertEquals(2, cause.getLocation().getColumnNr());
394+
assertEquals(1, cause.getLocation().getColumnNr());
395395
assertEquals(ContentReference.unknown(), cause.getLocation().contentReference());
396396
}
397397
}

0 commit comments

Comments
 (0)