Make AsyncCompleter complain when the future returned by CompletionService#poll isn't registered
ig
Branch: Deleted repository:master
Branch: atlassian/atlassian-util-concurrent:master
Merged
Merged pull request
Merged in iangrunert/atlassian-util-concurrent (pull request #2)
This ended up being the root cause for https://extranet.atlassian.com/display/~igrunert/2013/06/28/Streams+Drought .
Streams provides a CompletionService that returns a different future from #submit than it does from #poll, making the futures.remove call fail.
Finding it wasn't helped along by Streams using the UPM bundled version of atlassian-util-concurrent (2.3.0) instead of JIRA's (2.4.1) which meant that lines didn't match up when debugging at first.
I've changed the AsyncCompleter to complain bitterly if this happens again, and added a test for this.