Canceling an asynchronous IO operation throws NPE
Umashankar
Umashankar.Ningaiah at Sun.COM
Mon Jul 28 05:19:27 PDT 2008
Hi Alan,
On canceling an IO operation that is in progress,I get a
CancellationException which is expected as per the spec.
But in the stack trace, I also see a NullPointerException.
Following is the stack trace.
java.util.concurrent.CancellationException
at sun.nio.ch.PendingFuture.get(PendingFuture.java:136)
at
AsyncIOCancelTests.testWrite2FileChannel_01(AsyncIOCancelTests.java:50)
at AsyncIOCancelTests.main(AsyncIOCancelTests.java:19)
Exception in thread "Thread-1" java.lang.NullPointerException
at sun.nio.ch.PendingFuture$1.run(PendingFuture.java:206)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:674)
Please let me know if this is correct.
Thanks,
Umashankar
More information about the nio-dev
mailing list