{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/rdf4j/issues/294","repository_url":"https://api.github.com/repos/eclipse/rdf4j","labels_url":"https://api.github.com/repos/eclipse/rdf4j/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/rdf4j/issues/294/comments","events_url":"https://api.github.com/repos/eclipse/rdf4j/issues/294/events","html_url":"https://github.com/eclipse/rdf4j/pull/294","id":171550240,"number":294,"title":"issue#293 : Attempt to avoid nested NPE in BackgroundTupleResult","user":{"login":"ansell","id":82365,"avatar_url":"https://avatars.githubusercontent.com/u/82365?v=3","gravatar_id":"","url":"https://api.github.com/users/ansell","html_url":"https://github.com/ansell","followers_url":"https://api.github.com/users/ansell/followers","following_url":"https://api.github.com/users/ansell/following{/other_user}","gists_url":"https://api.github.com/users/ansell/gists{/gist_id}","starred_url":"https://api.github.com/users/ansell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansell/subscriptions","organizations_url":"https://api.github.com/users/ansell/orgs","repos_url":"https://api.github.com/users/ansell/repos","events_url":"https://api.github.com/users/ansell/events{/privacy}","received_events_url":"https://api.github.com/users/ansell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-17T00:43:23Z","updated_at":"2016-08-17T02:32:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/eclipse/rdf4j/pulls/294","html_url":"https://github.com/eclipse/rdf4j/pull/294","diff_url":"https://github.com/eclipse/rdf4j/pull/294.diff","patch_url":"https://github.com/eclipse/rdf4j/pull/294.patch"},"body":"This PR addresses GitHub issue: #293 \r\n\r\nBriefly describe the changes proposed in this PR:\r\n\r\n- Use double-checked locking on a volatile variable to properly isolate multiple calls to .close on Apache HTTPClient InputStreams in close succession\r\n\r\nMake sure you've followed the [Contributor Guidelines](https://github.com/eclipse/rdf4j/blob/master/.github/CONTRIBUTING.md). In particular (please tick to indicate you've taken care of it):\r\n\r\n- [x] RDF4J code formatting has been applied\r\n- [ ] tests are included\r\n- [x] all tests succeed\r\n\r\nThe volatile closed variable requires double-checked locking to properly operate.\r\n\r\nIn particular, we are required by non-threadsafe Apache HTTPClient implementations to not call close multiple times in close succession.\r\n\r\nIe, they don't fully comply with the standard java.io.Closeable.close contract but try to release their obligation by declaring their implementations as \"NotThreadSafe\".\r\n\r\nThe underlying issue is possibly that the InputStream is having .close called on it directly from another location, but volatile variables require double-checked locking to operate safely, so there are no downsides to this change, even though I can't see how handleClose could be called twice given the use of AtomicBoolean.compareAndSet to isolate them, assuming there are no bugs with AtomicBoolean.compareAndSet...\r\n\r\nRunning tests now to confirm no breakages caused by the changes.\r\n\r\nSigned-off-by: Peter Ansell <p_ansell@yahoo.com>"},"comment":{"url":"https://api.github.com/repos/eclipse/rdf4j/issues/comments/240297458","html_url":"https://github.com/eclipse/rdf4j/pull/294#issuecomment-240297458","issue_url":"https://api.github.com/repos/eclipse/rdf4j/issues/294","id":240297458,"user":{"login":"ansell","id":82365,"avatar_url":"https://avatars.githubusercontent.com/u/82365?v=3","gravatar_id":"","url":"https://api.github.com/users/ansell","html_url":"https://github.com/ansell","followers_url":"https://api.github.com/users/ansell/followers","following_url":"https://api.github.com/users/ansell/following{/other_user}","gists_url":"https://api.github.com/users/ansell/gists{/gist_id}","starred_url":"https://api.github.com/users/ansell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansell/subscriptions","organizations_url":"https://api.github.com/users/ansell/orgs","repos_url":"https://api.github.com/users/ansell/repos","events_url":"https://api.github.com/users/ansell/events{/privacy}","received_events_url":"https://api.github.com/users/ansell/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T02:32:07Z","updated_at":"2016-08-17T02:32:07Z","body":"All tests greenlined for me:\r\n\r\n```\r\n[INFO] RDF4J compliance tests ............................. SUCCESS [  0.012 s]\r\n[INFO] RDF4J Model compliance test ........................ SUCCESS [  9.850 s]\r\n[INFO] RDF4J Query Result IO compliance tests ............. SUCCESS [ 12.609 s]\r\n[INFO] RDF4J Rio compliance tests ......................... SUCCESS [03:22 min]\r\n[INFO] RDF4J HTTP server compliance tests ................. SUCCESS [ 14.865 s]\r\n[INFO] RDF4J SAIL and Repository compliance test .......... SUCCESS [10:55 min]\r\n[INFO] RDF4J SeRQL query parser compliance tests .......... SUCCESS [  5.420 s]\r\n[INFO] RDF4J SPARQL query parser compliance tests ......... SUCCESS [02:32 min]\r\n[INFO] RDF4J GeoSPARQL compliance tests ................... SUCCESS [  2.372 s]\r\n[INFO] RDF4J BOM .......................................... SUCCESS [  0.005 s]\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] BUILD SUCCESS\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Total time: 24:35 min\r\n[INFO] Finished at: 2016-08-17T11:27:50+10:00\r\n[INFO] Final Memory: 51M/787M\r\n[INFO] ------------------------------------------------------------------------\r\n```"}}
{"actor":{"display_login":"ansell"}}