Inconsistent results when comparing string references

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P1
    • 1.4.2_05
    • Affects Version/s: 1.4.2_02
    • Component/s: 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.

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

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: