8041772: (ch) PendingFuture.CANCELLED has backtrace that potentially keeps objects alive

Florian Weimer fweimer at redhat.com
Fri May 2 14:24:36 UTC 2014


On 05/02/2014 02:14 PM, Alan Bateman wrote:
> That's a protected constructor. In any case, I'm not sure that it's
> worth doing anything here. Cancellation and I/O are just not good
> bedfellows so I don't expect that it will be used very much. Also in
> normal usage then the Future will likely be in unreferenced quickly. If
> there are good examples where this might be a real issue then we can of
> course look at this again but I think that dropping the static field (as
> has been done) is the most important thing (and I'm happy you found that).

Oh, I assumed that it was necessary to keep the == check to avoid 
catching unrelated CancellationExceptions.  If that's not the case, 
9ea90ce2b8d9 looks okay.

-- 
Florian Weimer / Red Hat Product Security Team


More information about the nio-dev mailing list