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

java.io.ObjectInputStream.readObject can throw IndexOutOfBoundsException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • core-libs



      Name: skT45625 Date: 07/31/2000


      java version "1.2.2"
      Classic VM (build JDK-1.2.2-W, native threads, symcjit)

      also version 1.2.1 and 1.3


      The bug is the following code in java.io.ObjectInputStream:

                      try {
                          obj = wireHandle2Object.get(wireoffset);
                      } catch (ArrayIndexOutOfBoundsException e) {
                          throw new StreamCorruptedException("Reference to object neve
                      }
      It should be:
                      try {
                          obj = wireHandle2Object.get(wireoffset);
                      } catch (IndexOutOfBoundsException e) {
                          throw new StreamCorruptedException("Reference to object neve
                      }

      because ArrayList.get throws an IndexOutOfBoundsException not an
      ArrayIndexOutOfBoundsException.
      (Review ID: 107783)
      ======================================================================

            mwarressunw Michael Warres (Inactive)
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: