RFR: JDK-8056176 - Expected IOE or NO UnsupportedOperationException is not thrown when setting UART Baud Rate to unsupported value

Riaz A Aimandi riaz.aimandi at oracle.com
Wed Aug 27 18:02:35 UTC 2014


Hi Alexey,

OK, you can submit the fix, as it matches with the current spec.
But if you agree that IllegalArgumentException is more appropriate for this case, then please report an spec issue for consideration during next spec revision.

Thanks,

- riaz

On Aug 27, 2014, at 12:31 PM, alexey karaksin <alexey.karaksin at oracle.com> wrote:

> Hi Riaz,
> the spec says about 4 exceptions might be thrown by setBaudRate:
> 
>    java.lang.UnsupportedOperationException - if this UART cannot be configured with the requested baud rate.
>    UnavailableDeviceException - if this device is not currently available - such as it is locked by another application.
>    ClosedDeviceException - if the device has been closed.
>    java.io.IOException - if some other I/O error occurs.
> 
> in case of negative baudrate  UOE fits.
> 
> thanks,
> Alexey.
> 
> On 27.08.2014 20:11, Riaz A Aimandi wrote:
>> Hi Alexey,
>> 
>> Shouldn't setting negative baud rate result in IllegalArgumentException ?
>> 
>> Thanks,
>> 
>> - riaz
>> 
>> On Aug 27, 2014, at 11:44 AM, alexey karaksin <alexey.karaksin at oracle.com> wrote:
>> 
>>> issue: https://bugs.openjdk.java.net/browse/JDK-8056176
>>> webrev: http://cr.openjdk.java.net/~alkonsta/8056176/
>>> 
>>> hi,
>>> please review the changes,
>>> according to the spec  UnsupportedOperationException not IOException.
>>> 
>>> thanks,
>>> Alexey.
> 



More information about the dio-dev mailing list