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

Florian Weimer fweimer at redhat.com
Wed Apr 30 18:34:24 UTC 2014


On 04/30/2014 09:28 AM, Alan Bateman wrote:
> On 29/04/2014 22:47, Zhong Yu wrote:
>> This would change the stacktrace the application sees; does it matter?
>>
> It's a good question and could be confusing to have get throw
> CancellationException with the stack trace of the thread that called
> cancel. So I think we'll leave this as it was.

Would it make sense to call setStackTrace(new StackTraceElement[0]) on 
the marker exception?  The class retention issue looks it could cause 
problems in some cases.

-- 
Florian Weimer / Red Hat Product Security Team


More information about the nio-dev mailing list