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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b22
    • CPU:
      generic
    • OS:
      generic

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: