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

Java fails with ArrayOutOfBounds exception using jit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.1.6
    • 1.1.6
    • vm-legacy
    • 1.1.6
    • x86
    • windows_nt
    • Not verified



        Name: mf23781 Date: 05/13/98


        I have a simple program that displays some Locale information that runs fine
        on JDK 1.1.6 until I add a for loop to repeat one command to list the Properties.
        As far as I can tell, this is a valid for loop. The code works without the loop
        and if I specify -nojit when I run this program. If I run this program without
        the loop in it, it shows that the jit I am using is the symcjit.
         
        Here is the text of the exception that is thrown

        java.lang.ArrayIndexOutOfBoundsException
        at java.util.ResourceBundle.getLoader(Compiled Code)
        at ChkLocale.main(Compiled Code)
         
        Here is the source code import java.io.*;
        import java.util.*;
         
        public class ChkLocale
        {
              public static void main(String argv[])
              {
                   String MSGFILENAME = "CommercePOINTeTill";
                   ResourceBundle rb=null;
                   try {
                      rb = ResourceBundle.getBundle(MSGFILENAME);
                   } catch (MissingResourceException e)
                   {
                       // If the message resource bundle is not found the eTill will stop
                       System.out.println(e + " reading CommercePoint eTill message file ");

                   }
         
                   Properties sysProp = System.getProperties();
                   for (int i=0; i < 3; i++)
                       sysProp.list(System.out);
                       System.out.println(Locale.getDefault());
            
                   try {
                       OutputStreamWriter osw = new OutputStreamWriter(System.out);
                       BufferedWriter msgWriter = new BufferedWriter(new
                       OutputStreamWriter(System.out, "Cp819"));
                       msgWriter.write(rb.getString("CEP0702"));
                       msgWriter.flush();
         
                       msgWriter.write( rb.getString("CEP0435"));
                       msgWriter.flush();
                       System.out.println( rb.getString("CEP0435"));
                       }
                   catch (Exception e) {
                      System.out.println("IOExeption writing message" + e);
                   }
         
            String newLine = "\n";
            System.out.println("newLine has " + newLine.length() + " characters");
            }
        }


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

              dviswanasunw Deepa Viswanathan (Inactive)
              miflemi Mick Fleming
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: