RFR: DIO-21: Second call to DeviceManager.open(I2CDeviceConfig) results in IOE instead of UDE

boris kvartskhava boris.kvartskhava at oracle.com
Tue Mar 29 14:31:48 UTC 2016


issue: https://bugs.openjdk.java.net/browse/DIO-21
webrev: http://cr.openjdk.java.net/~onazarkina/DIO-21/

According to the specification, DeviceManager.open() methods are 
expected to throw
"UnavailableDeviceException (UDE) -
     if the designated device is not currently available - such as if it 
is already open with exclusive access."

This is checked in i2c_attach_slave_to_bus whose return value 
(JAVACALL_DIO_BUSY which is translated into UDE)
  is wrongly ignored and JAVACALL_DIO_FAIL (translated into IOE) is 
returned instead.


More information about the dio-dev mailing list