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

The java.util.TimeZone.getAvailableIDs(int) throws exception

XMLWordPrintable

    • 1.2fcs
    • sparc
    • solaris_2.5
    • Verified



      Name: avC70361 Date: 06/22/98



        The java.utilTimeZone.getAvailableIDs(int offset) throws unexpected
      ArrayIndexOutOfBoundsException for one hour offset(3600000).

      Here is a test demonstrating the bug.
      ------------GetAvailableIDsTest.java----------
      import java.util.TimeZone;

      public class GetAvailableIDsTest {
        public static void main(String args[]) {
          String[] IDs = TimeZone.getAvailableIDs(3600000);
        }
      }
      ------------The test output--------
      <avv@stardust(pts/3).566> java -version
      java version "1.2beta4"
      Classic VM (build JDK-1.2beta4-J, green threads, sunwjit)
      <avv@stardust(pts/3).567> java GetAvailableIDsTest
      Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 36
              at java.util.TimeZone.getAvailableIDs(Compiled Code)
              at GetAvailableIDsTest.main(Compiled Code)

      ======================================================================

            aliusunw Alan Liu (Inactive)
            ovlasov Oleksandr Vlasov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: