AsynchronousSocketChannel still throws unspecified exception

cowwoc cowwoc at bbs.darktech.org
Mon Jun 13 21:21:43 PDT 2011


cowwoc wrote:
> 
> 
> Alan Bateman-2 wrote:
>> 
>> cowwoc wrote:
>>> Hi Alan,
>>>
>>> Remember in http://web.archiveorange.com/archive/v/gpYtBJmUMNrbuF39jKmu
>>> we
>>> discussed that read() should throw a specific exception
>>> (IllegalStateException) instead of "an unspecified runtime exception"?
>>> You
>>> mentioned you would resolve this but it doesn't seem to have happened in
>>> the
>>> past couple of months. Now, with the JDK7 API being officially "frozen"
>>> I'm
>>> worried this will never make it in.
>>>
>>> Is this change going in?
>>>   
>> Ah boo, I did say we should change this to an IllegalStateException but 
>> it didn't happen. My fault. As it's not a critical/showstopper issue 
>> then there is little chance that we have fix this now. This means we'll 
>> have to re-examine it in 8. It helps that the implementation already 
>> throws IllegalStateException for this case and so compatibility risk is 
>> confined to other AsynchronousChannel implementations (likely to be 
>> few).  As I recall you ran into this with a serial port channel where 
>> data loss was acceptable or you could guarantee that no data would be 
>> loss, in which case you may already have specified your channel
>> differently.
>> 
>> -Alan.
>> 
> 
> Can you please provide me with a BugParade number so I can track when this
> gets fixed? :)
> 
> Thanks,
> Gili
> 


Also, I think you should push very hard to get this fixed in JDK7. I'd be
very surprised if Oracle lets you change this part of the specification in
JDK8 because doing so would break backwards-compatibility for existing
implementations. Better to fix it now before the final spec is published.

Gili

--
View this message in context: http://nio-dev.3157472.n2.nabble.com/AsynchronousSocketChannel-still-throws-unspecified-exception-tp6471557p6472724.html
Sent from the nio-dev mailing list archive at Nabble.com.


More information about the nio-dev mailing list