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

bindBidirection works for ReadOnly*Wrapper incorrectly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u31
    • Fix Version/s: 9
    • Component/s: javafx
    • Environment:

      java version "1.8.0_31"
      Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
      Java HotSpot(TM) Client VM (build 25.31-b07, mixed mode)

    • Subcomponent:

      Backports

        Description

        ReadOnlyStringWrapper a = new ReadOnlyStringWrapper("a");
        ReadOnlyStringWrapper b = new ReadOnlyStringWrapper("b");

        b.bindBidirectional(a);
        //a.bindBidirectional(b); //only this can fix it

        a.set("a1"); // a == "a1",b == "a1"
        b.set("b1"); // b == "b1", a == "a1" (!!!)

        a.set("a2"); // a == "a2",b == "a2"
        b.set("b2"); // b == "b2", a == "a2" (!!!)

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  vadim Vadim Pakhnushev
                  Reporter:
                  duke J. Duke (Inactive)
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported: