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

Bindings.bindContentBidirectional does not work correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 8u45
    • javafx
    • x86_64
    • linux

    Description

      FULL PRODUCT VERSION :
      java version "1.8.0_45"
      Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Bug is OS-indepdendent

      A DESCRIPTION OF THE PROBLEM :
      When overwriting a value to an ObservableMap, the other map will just delete the key but not update it.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the testcase.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      {key=val2}


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javafx.beans.binding.Bindings;
      import javafx.collections.FXCollections;
      import javafx.collections.ObservableMap;

      public class BindContentBidirectionalBug {
      public static void main(String[] args) {
      ObservableMap<String, Object> m1 = FXCollections.observableHashMap();
      ObservableMap<String, Object> m2 = FXCollections.observableHashMap();
      Bindings.bindContentBidirectional(m1, m2);
      m1.put("key", "val1");
      m1.put("key", "val2");
      System.out.println(m2);
      }
      }

      ---------- END SOURCE ----------

      Attachments

        Issue Links

          Activity

            People

              vadim Vadim Pakhnushev
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: