Unexpected IllegalArgumentException if same buffer was provided to multiple appendRead/appendWrite calls as a parameter

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P3
    • None
    • Affects Version/s: 1.1
    • Component/s: embedded
    • None
    • dio
    • generic
    • generic

      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.

            Assignee:
            Boris Kvartskhava
            Reporter:
            Boris Kvartskhava
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: