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

fp.bugs 2435: interpreter cannot find class with multiple same final strings

XMLWordPrintable

    • 1.0beta2
    • x86
    • windows_nt
    • Verified

      Paul Pyyvaara <###@###.###>

      All platforms: When you try to run a program with a class with multiple final strings
      that are the same, receive following error message:

      Can't find class <class name>

      Steps to reproduce:
      Compile the attached code.
      run java FinalStringTest

      class FinalStringTest
      {
          public final static String string1 = "The same string";
          public final static String string2 = "The same string";

          public static void main(String args[])
          {
             if (string1.equals(string2))
                System.out.println("They compare");
             else
                System.out.println("They don't compare");
          }
      }

            fyellinsunw Frank Yellin (Inactive)
            kasmithsunw Kevin Smith (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: