[
https://issues.apache.org/jira/browse/JENA-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17152865#comment-17152865
]
Andy Seaborne commented on JENA-1935:
-------------------------------------
Seems we didn't finish JENA-1862 properly.
Only converting to a string is affected; the query will function properly.
> Query::cloneQuery produces invalid syntax
> -----------------------------------------
>
> Key: JENA-1935
> URL: https://issues.apache.org/jira/browse/JENA-1935
> Project: Apache Jena
> Issue Type: Bug
> Components: ARQ
> Affects Versions: Jena 3.16.0
> Reporter: Martynas Jusevičius
> Assignee: Andy Seaborne
> Priority: Minor
>
> {code:java}
> QueryFactory.create("PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> ASK { SELECT * { ?class a rdfs:Class . } }").cloneQuery().toString()
> {code}
> produces
> {noformat}
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> ASK
> WHERE
> { PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>
> SELECT *
> WHERE
> { ?class a rdfs:Class }
> }
> {noformat}
> which is invalid SPARQL syntax (note the second {{PREFIX}}).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)