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

Alan Bateman Alan.Bateman at oracle.com
Tue Apr 29 12:55:59 UTC 2014


This is an issue that Zhong Yu pointed out recently [1]. Easily fixed by 
removing the static field and creating the CancellationException when 
the cancel method is called:
   http://cr.openjdk.java.net/~alanb/8041772/webrev/

I don't propose to include a test with this specific patch, instead I'd 
prefer to add a more general test that is long running to ensure that 
there aren't any unnecessary objects retained.

-Alan.

[1] http://mail.openjdk.java.net/pipermail/nio-dev/2014-April/002614.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20140429/f38e2725/attachment.html>


More information about the nio-dev mailing list