Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8144994

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • None
    • 1.1
    • 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.

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

              Created:
              Updated: