Class com.oracle.dio.i2cbus.impl.I2CCombinedMessage
includes a method
void check(Message message) throws ClosedDeviceException {
...
...
...
for (int i = 0; i < messageList.size(); i++) {
if (messageList.get(i).buf == message.buf) {
throw new IllegalArgumentException(
ExceptionMessage.format(ExceptionMessage.I2CBUS_BUFFER_GIVEN_TWICE)
);
}
}
}
==============
This check goes beyond specification requirements and is a source
of unexpected IAE if same buffer was provided >1 times to appendRead()/appendWrite() methods as a parameter value.
includes a method
void check(Message message) throws ClosedDeviceException {
...
...
...
for (int i = 0; i < messageList.size(); i++) {
if (messageList.get(i).buf == message.buf) {
throw new IllegalArgumentException(
ExceptionMessage.format(ExceptionMessage.I2CBUS_BUFFER_GIVEN_TWICE)
);
}
}
}
==============
This check goes beyond specification requirements and is a source
of unexpected IAE if same buffer was provided >1 times to appendRead()/appendWrite() methods as a parameter value.
- relates to
-
JDK-8145419 I2CCombinedMessage.transfer() would not trigger a stop condition if last recently added buffer's remaining() == 0
- Resolved