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

RandomAccessFile#write method could throw IndexOutOfBoundsException that is not described in javadoc

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 18
    • core-libs
    • None
    • b22
    • generic
    • generic

      RandomAccessFile#write method use native writeBytes method that declared on io_util.c. The writeBytes method could throw an IndexOutOfBoundsException, but the javadoc of RandomAccessFile#write doesn't have "@throws IndexOutOfBoundsException".

      In a similar case, RandomAccessFile#read has a javadoc of "@throws IndexOutOfBoundsException".

      The javadoc for RandomAccessFile#write is missing an exception.

            myano Masanori Yano
            myano Masanori Yano
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: