Skip to content

Commit bfa2aec

Browse files
committed
GH-5691 CLI for running and storing query explanations
1 parent 1228299 commit bfa2aec

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

core/rio/jsonld-legacy/src/main/java/org/eclipse/rdf4j/rio/jsonld/legacy/JSONLDParser.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,9 @@ private JsonFactory configureNewJsonFactory() {
198198
builder.configure(JsonReadFeature.ALLOW_TRAILING_COMMA,
199199
parserConfig.get(JSONSettings.ALLOW_TRAILING_COMMA));
200200
}
201-
if (parserConfig.isSet(JSONSettings.INCLUDE_SOURCE_IN_LOCATION)) {
202-
builder.configure(StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION,
203-
parserConfig.get(JSONSettings.INCLUDE_SOURCE_IN_LOCATION));
204-
}
201+
// Always apply the RDF4J-configured default to avoid backend-default drift between Jackson versions.
202+
builder.configure(StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION,
203+
parserConfig.get(JSONSettings.INCLUDE_SOURCE_IN_LOCATION));
205204
if (parserConfig.isSet(JSONSettings.STRICT_DUPLICATE_DETECTION)) {
206205
builder.configure(StreamReadFeature.STRICT_DUPLICATE_DETECTION,
207206
parserConfig.get(JSONSettings.STRICT_DUPLICATE_DETECTION));

core/rio/jsonld-legacy/src/test/java/org/eclipse/rdf4j/rio/jsonld/legacy/JSONLDParserCustomTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ public void testIncludeSourceLocationDefault() throws Exception {
361361
assertTrue(e.getCause() instanceof JsonProcessingException);
362362
JsonProcessingException cause = (JsonProcessingException) e.getCause();
363363
assertEquals(2, cause.getLocation().getLineNr());
364-
assertEquals(3, cause.getLocation().getColumnNr());
364+
assertEquals(2, cause.getLocation().getColumnNr());
365365
assertNotEquals(ContentReference.unknown(), cause.getLocation().contentReference());
366366
assertEquals(source, cause.getLocation().contentReference().getRawContent());
367367
}
@@ -379,7 +379,7 @@ public void testIncludeSourceLocationEnabled() throws Exception {
379379
assertTrue(e.getCause() instanceof JsonProcessingException);
380380
JsonProcessingException cause = (JsonProcessingException) e.getCause();
381381
assertEquals(2, cause.getLocation().getLineNr());
382-
assertEquals(3, cause.getLocation().getColumnNr());
382+
assertEquals(2, cause.getLocation().getColumnNr());
383383
assertNotEquals(ContentReference.unknown(), cause.getLocation().contentReference());
384384
assertEquals(source, cause.getLocation().contentReference().getRawContent());
385385
}
@@ -396,7 +396,7 @@ public void testIncludeSourceLocationDisabled() throws Exception {
396396
assertTrue(e.getCause() instanceof JsonProcessingException);
397397
JsonProcessingException cause = (JsonProcessingException) e.getCause();
398398
assertEquals(2, cause.getLocation().getLineNr());
399-
assertEquals(3, cause.getLocation().getColumnNr());
399+
assertEquals(2, cause.getLocation().getColumnNr());
400400
assertEquals(ContentReference.unknown(), cause.getLocation().contentReference());
401401
}
402402
}

0 commit comments

Comments
 (0)