Skip to content

Include line separator when reading queries from Jar resources.#1247

Merged
jamesaoverton merged 1 commit intoontodev:masterfrom
gouttegd:fix-reading-queries-from-resources
Mar 7, 2025
Merged

Include line separator when reading queries from Jar resources.#1247
jamesaoverton merged 1 commit intoontodev:masterfrom
gouttegd:fix-reading-queries-from-resources

Conversation

@gouttegd
Copy link
Contributor

@gouttegd gouttegd commented Mar 6, 2025

Resolves [#1212]

  • docs/ have been added/updated
  • tests have been added/updated
  • mvn verify says all tests pass
  • mvn site says all JavaDocs correct
  • CHANGELOG.md has been updated

When we read a default query string from a resource embedded within the Jar file, we need to make sure to explicitly include a line separator between each line (the line terminator is not included in the value returned by BufferedReader#readLine()). Otherwise the entire query is stored as a single line, which prevents its from being analyzed correctly by the SPARQL parser.

When we read a default query string from a resource embedded within the
Jar file, make sure to explicitly include a line separator between each
line (the line terminator is *not* included in the value returned by
BufferedReader#readLine()). Otherwise the entire query is stored as a
single line, which prevents its from being analyzed correctly by the
SPARQL parser.
@gouttegd gouttegd self-assigned this Mar 6, 2025
@gouttegd gouttegd requested a review from jamesaoverton March 6, 2025 17:12
@jamesaoverton
Copy link
Member

This one is horrifying. I'm amazed it didn't cause a bigger problem. Thanks!

@jamesaoverton jamesaoverton merged commit 2bc146f into ontodev:master Mar 7, 2025
3 checks passed
@gouttegd gouttegd deleted the fix-reading-queries-from-resources branch March 7, 2025 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New duplicate_exact_synonym test in robot report does not display values

2 participants