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

Inconsistent results when comparing string references

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • 1.4.2_05
    • 1.4.2_02
    • hotspot
    • 05
    • generic
    • solaris_8
    • Verified

        A piece of code that is written as follows:

        String s = "";
        while (s == "") { }

        ...is seen to produce inconsistent results when it is embedded within a highly threaded program having thousands of lines of code. Under IBM's VM, this always evaluates as TRUE. With Sun's VM, the loop is occasionally ignored.

              rknippelsunw Ross Knippel (Inactive)
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: