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

DefaultListSelectionModel.removeIndexInterval(0, Integer.MAX_VALUE) fails

    XMLWordPrintable

Details

    • b08
    • x86
    • windows_2000

    Description

      FULL PRODUCT VERSION :
      java version "1.5.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
      Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows 2000 [Version 5.00.2195]

      A DESCRIPTION OF THE PROBLEM :
      DefaultListSelectionModel.removeIndexInterval(0, Integer.MAX_VALUE) fails

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      run code

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      no exception
      ACTUAL -
      exception

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      java.lang.IndexOutOfBoundsException: bitIndex < 0: -2147483648

      at java.util.BitSet.get(BitSet.java:459)

      at javax.swing.DefaultListSelectionModel.removeIndexInterval(DefaultListSelectionModel.java:586)

      at Test.main(Test.java:8)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.*;

      public class Test {
        public static void main(String[] args) {
          try {
             DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
             selectionModel.setSelectionInterval(0, 1);
             selectionModel.removeIndexInterval(0, Integer.MAX_VALUE);
          } catch (Exception ex) {
              ex.printStackTrace();
          }
        }
      }

      ---------- END SOURCE ----------
      ###@###.### 10/29/04 22:38 GMT

      Attachments

        Issue Links

          Activity

            People

              psadhukhan Prasanta Sadhukhan
              gmanwanisunw Girish Manwani (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: