wang3820 opened a new pull request, #2096: URL: https://github.com/apache/jena/pull/2096
Pull request Description: ### Issue Tests like `org.apache.jena.query.TestParameterizedSparqlString#test_param_string_injection_10` makes more than one injections. `ParameterizedSparqlString.getVars()` is used to retrieve the order of injections, `getVars()` calls `this.params.keySet().iterator()` on the `ParameterizedSparqlString` object and the implementation of `params` of `ParameterizedSparqlString` is a `HashMap` which does not guarantee the order. So what is returned is not necessarily by the injection order. https://github.com/apache/jena/blob/fc01d33e6c11eed68784f820bf2dd161868d1d37/jena-arq/src/main/java/org/apache/jena/query/ParameterizedSparqlString.java#L1138 https://github.com/apache/jena/blob/fc01d33e6c11eed68784f820bf2dd161868d1d37/jena-arq/src/main/java/org/apache/jena/query/ParameterizedSparqlString.java#L141 ### Fix The implementation of `params` of `ParameterizedSparqlString` is change to `LinkedHashMap` which guarantees the order returned is order of injection ---- - [ ] Tests are included. - [ ] Documentation change and updates are provided for the [Apache Jena website](https://github.com/apache/jena-site/) - [x] Commits have been squashed to remove intermediate development commit messages. - [ ] Key commit messages start with the issue number (GH-xxxx, or if in JIRA, JENA-xxxx) By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the [Contributor's Agreement](https://www.apache.org/licenses/contributor-agreements.html). ---- See the [Apache Jena "Contributing" guide](https://github.com/apache/jena/blob/main/CONTRIBUTING.md). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
