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

alexey karaksin alexey.karaksin at oracle.com
Wed Aug 27 16:31:46 UTC 2014


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