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 ----------
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
- relates to
-
JDK-8134934 Bindings.bindContent doesn't reflect the value changes in the ObservableMap
-
- Resolved
-