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

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Component/s: embedded
    • Labels:
      None
    • Subcomponent:
      dio
    • CPU:
      generic
    • OS:
      generic

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated: