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

fp.bugs 3677 BitSet.set(64000) gets java.lang.ArrayIndexOutOfBoundsException

XMLWordPrintable

    • 1.1
    • sparc
    • solaris_2.5
    • Not verified


      From: ###@###.### (Scott Hudson)
      This does not look like form output to me.



      This is for JDK 1.0. I'm running on a Sparc ELC under Solaris 2.3.
      The following program:

      public class bitset_test {
        public static void main(String argv[])
          {
            java.util.BitSet s = new java.util.BitSet();
            s.set(64000);
          }
      }

      produces:

      java.lang.ArrayIndexOutOfBoundsException: 1000
              at java.util.BitSet.set(BitSet.java)
              at bitset_test.main(bitset_test.java:6)


      Interestingly, a value of 63999 does not cause this problem. In addition,
      if the size of the BitSet is implicitly increased by an earlier call to set()
      this problem does not occur.

      Scott Hudson

            tlindholsunw Timothy Lindholm (Inactive)
            bhagen Benjamin Hagen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: