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

REGRESSION: Resource bundle with same name as class file cause looping exception

XMLWordPrintable

      A DESCRIPTION OF THE REGRESSION :

      An application has been written to read a resource bundle. If the resource bundle is in the same directory as the application, with the same name as the application (e.g. resourceTest/Test.properties and resourceTest/Test.java) then loading the resource bundle causes looping exception behaviour.

      This works fine under JDK5.

      REPRODUCIBLE TESTCASE OR STEPS TO REPRODUCE:
      Application test case consists of one java file and one properties file. Compile and run the application using the command:

      java resourceTest.Test


      Test case follows:

      ========= File resourceTest/Test.java ==============================
      package resourceTest;

      import java.util.ResourceBundle;

      public class Test
      {
          private ResourceBundle bundle;

          public Test()
          {
              try
              {
                  bundle = ResourceBundle.getBundle("resourceTest.Test");
                  System.out.println(bundle.getString("DB_SCHEMA"));
              }
              catch (Throwable ivjExc)
              {
                  System.out.println("--------- EXCEPTION ---------");
              }
          }

          public static void main(String[] args) {
              new Test();
          }

      }
      =========End of resourceTest/Test.java============================


      ========= File resourceTest/Test.properties ========================
      DB_SCHEMA = Schema_Name
      ========= End of resourceTest/Test.properties ======================



      RELEASE LAST WORKED:
      5.0 Update 6

      RELEASE TEST FAILS:
      mustang-b69

      OBSERVED APPLICATION IMPACT:
      Applications that exhibit this problem fail to work.

      Release Regression From : 5.0
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

            okutsu Masayoshi Okutsu
            rgutupalsunw Rajendra Gutupalli (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: