apache / jena

Apache Jena
https://jena.apache.org/
Apache License 2.0
1.08k stars 643 forks source link

HttpAction transaction fixes (GH-2543) #2563

Closed rvesse closed 3 days ago

rvesse commented 4 days ago

In looking into whether the prefixes service PR #2538 could be refactored to reduce code duplication I noticed that if an Action is registered directly as servicing a URL, rather than being associated with a Dataset, then if the Action tries to use any of the transaction handling of HttpAction it can result in NPEs because some access to the transactional context was not checking for non-null transactional objects. This commit addresses that problem and should allow #2538 to be refactored.


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.


See the Apache Jena "Contributing" guide.

afs commented 3 days ago

There is work going on elsewhere in response to the comments on #2538 that covers this and includes another change needed to HttpAction. It gets tested because all the tests in #2538 then run refactored and properly.

rvesse commented 3 days ago

Per discussion, closing in favour of larger refactoring and fixes ongoing in #2538