Make AsyncCompleter complain when the future returned by CompletionService#poll isn't registered

Merged
#2 · Created  · Last updated

Merged pull request

Merged in iangrunert/atlassian-util-concurrent (pull request #2)

c59d58b·Author: ·Closed by: ·2013-07-18

Description

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.

0 attachments

0 comments

Loading commits...