--- old/modules/base/src/main/java/javafx/beans/property/ReadOnlyBooleanWrapper.java 2015-08-04 14:44:32.696145600 +0300 +++ new/modules/base/src/main/java/javafx/beans/property/ReadOnlyBooleanWrapper.java 2015-08-04 14:44:32.435130700 +0300 @@ -25,9 +25,6 @@ package javafx.beans.property; -import javafx.beans.InvalidationListener; -import javafx.beans.value.ChangeListener; - /** * This class provides a convenient class to define read-only properties. It * creates two properties that are synchronized. One property is read-only @@ -100,44 +97,8 @@ * {@inheritDoc} */ @Override - public void addListener(InvalidationListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener( - InvalidationListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(ChangeListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(ChangeListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override protected void fireValueChangedEvent() { + super.fireValueChangedEvent(); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(); } --- old/modules/base/src/main/java/javafx/beans/property/ReadOnlyDoubleWrapper.java 2015-08-04 14:44:34.476251800 +0300 +++ new/modules/base/src/main/java/javafx/beans/property/ReadOnlyDoubleWrapper.java 2015-08-04 14:44:34.243238400 +0300 @@ -25,9 +25,6 @@ package javafx.beans.property; -import javafx.beans.InvalidationListener; -import javafx.beans.value.ChangeListener; - /** * This class provides a convenient class to define read-only properties. It * creates two properties that are synchronized. One property is read-only @@ -100,43 +97,8 @@ * {@inheritDoc} */ @Override - public void addListener(InvalidationListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(InvalidationListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(ChangeListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(ChangeListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override protected void fireValueChangedEvent() { + super.fireValueChangedEvent(); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(); } --- old/modules/base/src/main/java/javafx/beans/property/ReadOnlyFloatWrapper.java 2015-08-04 14:44:36.139348300 +0300 +++ new/modules/base/src/main/java/javafx/beans/property/ReadOnlyFloatWrapper.java 2015-08-04 14:44:35.924336000 +0300 @@ -25,9 +25,6 @@ package javafx.beans.property; -import javafx.beans.InvalidationListener; -import javafx.beans.value.ChangeListener; - /** * This class provides a convenient class to define read-only properties. It * creates two properties that are synchronized. One property is read-only @@ -99,43 +96,8 @@ * {@inheritDoc} */ @Override - public void addListener(InvalidationListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(InvalidationListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(ChangeListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(ChangeListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override protected void fireValueChangedEvent() { + super.fireValueChangedEvent(); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(); } --- old/modules/base/src/main/java/javafx/beans/property/ReadOnlyIntegerWrapper.java 2015-08-04 14:44:38.880564800 +0300 +++ new/modules/base/src/main/java/javafx/beans/property/ReadOnlyIntegerWrapper.java 2015-08-04 14:44:38.554038800 +0300 @@ -25,9 +25,6 @@ package javafx.beans.property; -import javafx.beans.InvalidationListener; -import javafx.beans.value.ChangeListener; - /** * This class provides a convenient class to define read-only properties. It * creates two properties that are synchronized. One property is read-only @@ -99,43 +96,8 @@ * {@inheritDoc} */ @Override - public void addListener(InvalidationListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(InvalidationListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(ChangeListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(ChangeListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override protected void fireValueChangedEvent() { + super.fireValueChangedEvent(); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(); } --- old/modules/base/src/main/java/javafx/beans/property/ReadOnlyListWrapper.java 2015-08-04 14:44:42.045338500 +0300 +++ new/modules/base/src/main/java/javafx/beans/property/ReadOnlyListWrapper.java 2015-08-04 14:44:41.699811700 +0300 @@ -25,11 +25,7 @@ package javafx.beans.property; -import javafx.beans.InvalidationListener; -import javafx.beans.value.ChangeListener; -import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; - import static javafx.collections.ListChangeListener.Change; /** @@ -104,61 +100,8 @@ * {@inheritDoc} */ @Override - public void addListener(InvalidationListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(InvalidationListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(ChangeListener> listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(ChangeListener> listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(ListChangeListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(ListChangeListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override protected void fireValueChangedEvent() { + super.fireValueChangedEvent(); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(); } @@ -169,6 +112,7 @@ */ @Override protected void fireValueChangedEvent(Change change) { + super.fireValueChangedEvent(change); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(change); } --- old/modules/base/src/main/java/javafx/beans/property/ReadOnlyLongWrapper.java 2015-08-04 14:44:44.884070000 +0300 +++ new/modules/base/src/main/java/javafx/beans/property/ReadOnlyLongWrapper.java 2015-08-04 14:44:44.555049800 +0300 @@ -25,9 +25,6 @@ package javafx.beans.property; -import javafx.beans.InvalidationListener; -import javafx.beans.value.ChangeListener; - /** * This class provides a convenient class to define read-only properties. It * creates two properties that are synchronized. One property is read-only @@ -99,43 +96,8 @@ * {@inheritDoc} */ @Override - public void addListener(InvalidationListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(InvalidationListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(ChangeListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(ChangeListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override protected void fireValueChangedEvent() { + super.fireValueChangedEvent(); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(); } --- old/modules/base/src/main/java/javafx/beans/property/ReadOnlyMapWrapper.java 2015-08-04 14:44:47.377247100 +0300 +++ new/modules/base/src/main/java/javafx/beans/property/ReadOnlyMapWrapper.java 2015-08-04 14:44:47.041224900 +0300 @@ -25,11 +25,7 @@ package javafx.beans.property; -import javafx.beans.InvalidationListener; -import javafx.beans.value.ChangeListener; import javafx.collections.ObservableMap; -import javafx.collections.MapChangeListener; - import static javafx.collections.MapChangeListener.Change; /** @@ -104,61 +100,8 @@ * {@inheritDoc} */ @Override - public void addListener(InvalidationListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(InvalidationListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(ChangeListener> listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(ChangeListener> listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(MapChangeListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(MapChangeListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override protected void fireValueChangedEvent() { + super.fireValueChangedEvent(); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(); } @@ -169,6 +112,7 @@ */ @Override protected void fireValueChangedEvent(Change change) { + super.fireValueChangedEvent(change); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(change); } --- old/modules/base/src/main/java/javafx/beans/property/ReadOnlyObjectWrapper.java 2015-08-04 14:44:50.088455000 +0300 +++ new/modules/base/src/main/java/javafx/beans/property/ReadOnlyObjectWrapper.java 2015-08-04 14:44:49.772436900 +0300 @@ -25,9 +25,6 @@ package javafx.beans.property; -import javafx.beans.InvalidationListener; -import javafx.beans.value.ChangeListener; - /** * This class provides a convenient class to define read-only properties. It * creates two properties that are synchronized. One property is read-only @@ -99,43 +96,8 @@ * {@inheritDoc} */ @Override - public void addListener(InvalidationListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(InvalidationListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(ChangeListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(ChangeListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override protected void fireValueChangedEvent() { + super.fireValueChangedEvent(); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(); } --- old/modules/base/src/main/java/javafx/beans/property/ReadOnlySetWrapper.java 2015-08-04 14:44:53.086200900 +0300 +++ new/modules/base/src/main/java/javafx/beans/property/ReadOnlySetWrapper.java 2015-08-04 14:44:52.768676800 +0300 @@ -25,11 +25,7 @@ package javafx.beans.property; -import javafx.beans.InvalidationListener; -import javafx.beans.value.ChangeListener; import javafx.collections.ObservableSet; -import javafx.collections.SetChangeListener; - import static javafx.collections.SetChangeListener.Change; /** @@ -104,61 +100,8 @@ * {@inheritDoc} */ @Override - public void addListener(InvalidationListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(InvalidationListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(ChangeListener> listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(ChangeListener> listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(SetChangeListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(SetChangeListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override protected void fireValueChangedEvent() { + super.fireValueChangedEvent(); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(); } @@ -169,6 +112,7 @@ */ @Override protected void fireValueChangedEvent(Change change) { + super.fireValueChangedEvent(change); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(change); } --- old/modules/base/src/main/java/javafx/beans/property/ReadOnlyStringWrapper.java 2015-08-04 14:44:56.374512300 +0300 +++ new/modules/base/src/main/java/javafx/beans/property/ReadOnlyStringWrapper.java 2015-08-04 14:44:56.032987200 +0300 @@ -25,9 +25,6 @@ package javafx.beans.property; -import javafx.beans.InvalidationListener; -import javafx.beans.value.ChangeListener; - /** * This class provides a convenient class to define read-only properties. It * creates two properties that are synchronized. One property is read-only @@ -100,44 +97,8 @@ * {@inheritDoc} */ @Override - public void addListener(InvalidationListener listener) { - getReadOnlyProperty().addListener(listener); - get(); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(InvalidationListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(ChangeListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(ChangeListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override protected void fireValueChangedEvent() { + super.fireValueChangedEvent(); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(); } --- old/modules/base/src/test/java/com/sun/javafx/binding/BidirectionalBindingTest.java 2015-08-04 14:44:59.272260300 +0300 +++ new/modules/base/src/test/java/com/sun/javafx/binding/BidirectionalBindingTest.java 2015-08-04 14:44:58.953240600 +0300 @@ -25,10 +25,8 @@ package com.sun.javafx.binding; -import javafx.beans.InvalidationListener; import javafx.beans.binding.Bindings; import javafx.beans.property.*; -import javafx.beans.value.ChangeListener; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -36,262 +34,272 @@ import java.util.Arrays; import java.util.Collection; +import javafx.beans.value.ObservableValue; import static org.junit.Assert.*; -import org.junit.Rule; -import org.junit.rules.ExpectedException; @RunWith(Parameterized.class) public class BidirectionalBindingTest { - - private static final float EPSILON_FLOAT = 1e-5f; - private static final double EPSILON_DOUBLE = 1e-10; - - public static interface Functions { - PropertyMock create(); - void bind(PropertyMock obj1, PropertyMock obj2); - void unbind(PropertyMock obj1, PropertyMock obj2); - BidirectionalBinding createBindingDirectly(PropertyMock op1, PropertyMock op2); - void check(S expected, S actual); - } - - private final Functions func; - private final T[] v; - - @Rule - public ExpectedException thrown = ExpectedException.none(); - - private PropertyMock op1; - private PropertyMock op2; - private PropertyMock op3; - private PropertyMock op4; - - public BidirectionalBindingTest(Functions func, T[] v) { - this.op1 = func.create(); - this.op2 = func.create(); - this.op3 = func.create(); - this.op4 = func.create(); - this.func = func; - this.v = v; + + @FunctionalInterface + public static interface PropertyFactory { + Property createProperty(); + } + + public static class Factory { + + private PropertyFactory propertyFactory; + private T[] values; + public Factory(PropertyFactory propertyFactory, T[] values) { + this.propertyFactory = propertyFactory; + this.values = values; + } + public Property createProperty() { + return propertyFactory.createProperty(); + } + public T[] getValues() { + return values; + } + } + + private Factory factory; + private Property op1; + private Property op2; + private Property op3; + private Property op4; + private T[] v; + + public BidirectionalBindingTest(Factory factory) { + this.factory = factory; } @Before public void setUp() { - op1.setValue(v[0]); - op2.setValue(v[1]); + op1 = factory.createProperty(); + op2 = factory.createProperty(); + op3 = factory.createProperty(); + op4 = factory.createProperty(); + v = factory.getValues(); + op1.setValue(v[0]); + op2.setValue(v[1]); } - + @Test public void testBind() { - func.bind(op1, op2); - System.gc(); // making sure we did not not overdo weak references - func.check(v[1], op1.getValue()); - func.check(v[1], op2.getValue()); - - op1.setValue(v[2]); - func.check(v[2], op1.getValue()); - func.check(v[2], op2.getValue()); - - op2.setValue(v[3]); - func.check(v[3], op1.getValue()); - func.check(v[3], op2.getValue()); - } - - @Test - public void testUnbind() { - // unbind non-existing binding => no-op - func.unbind(op1, op2); - - // unbind properties of different beans - func.bind(op1, op2); - System.gc(); // making sure we did not not overdo weak references - func.check(v[1], op1.getValue()); - func.check(v[1], op2.getValue()); - - func.unbind(op1, op2); - System.gc(); - func.check(v[1], op1.getValue()); - func.check(v[1], op2.getValue()); - - op1.setValue(v[2]); - func.check(v[2], op1.getValue()); - func.check(v[1], op2.getValue()); - - op2.setValue(v[3]); - func.check(v[2], op1.getValue()); - func.check(v[3], op2.getValue()); - } - - @Test - public void testChaining() { - op3.setValue(v[2]); - func.bind(op1, op2); - func.bind(op2, op3); - System.gc(); // making sure we did not not overdo weak references - func.check(v[2], op1.getValue()); - func.check(v[2], op2.getValue()); - func.check(v[2], op3.getValue()); - - op1.setValue(v[3]); - func.check(v[3], op1.getValue()); - func.check(v[3], op2.getValue()); - func.check(v[3], op3.getValue()); - - op2.setValue(v[0]); - func.check(v[0], op1.getValue()); - func.check(v[0], op2.getValue()); - func.check(v[0], op3.getValue()); - - op3.setValue(v[1]); - func.check(v[1], op1.getValue()); - func.check(v[1], op2.getValue()); - func.check(v[1], op3.getValue()); - - // now unbind - func.unbind(op1, op2); - System.gc(); // making sure we did not not overdo weak references - func.check(v[1], op1.getValue()); - func.check(v[1], op2.getValue()); - func.check(v[1], op3.getValue()); - - op1.setValue(v[2]); - func.check(v[2], op1.getValue()); - func.check(v[1], op2.getValue()); - func.check(v[1], op3.getValue()); - - op2.setValue(v[3]); - func.check(v[2], op1.getValue()); - func.check(v[3], op2.getValue()); - func.check(v[3], op3.getValue()); - - op3.setValue(v[0]); - func.check(v[2], op1.getValue()); - func.check(v[0], op2.getValue()); - func.check(v[0], op3.getValue()); - } - - @Test - public void testWeakReferencing() { - func.bind(op1, op2); - assertEquals(1, op1.getListenerCount()); - assertEquals(1, op2.getListenerCount()); - - op1 = null; - System.gc(); - op2.setValue(v[2]); - assertEquals(0, op2.getListenerCount()); - - func.bind(op2, op3); - assertEquals(1, op2.getListenerCount()); - assertEquals(1, op3.getListenerCount()); - - op3 = null; - System.gc(); - op2.setValue(v[0]); - assertEquals(0, op2.getListenerCount()); - } - - @Test - public void testHashCode() { - final int hc1 = func.createBindingDirectly(op1, op2).hashCode(); - final int hc2 = func.createBindingDirectly(op2, op1).hashCode(); - assertEquals(hc1, hc2); - } - - - @Test - public void testEquals() { - final BidirectionalBinding golden = func.createBindingDirectly(op1, op2); - - assertTrue(golden.equals(golden)); - assertFalse(golden.equals(null)); - assertFalse(golden.equals(op1)); - assertTrue(golden.equals(func.createBindingDirectly(op1, op2))); - assertTrue(golden.equals(func.createBindingDirectly(op2, op1))); - assertFalse(golden.equals(func.createBindingDirectly(op1, op3))); - assertFalse(golden.equals(func.createBindingDirectly(op3, op1))); - assertFalse(golden.equals(func.createBindingDirectly(op3, op2))); - assertFalse(golden.equals(func.createBindingDirectly(op2, op3))); - } - - @Test - public void testEqualsWithGCedProperty() { - final BidirectionalBinding binding1 = func.createBindingDirectly(op1, op2); - final BidirectionalBinding binding2 = func.createBindingDirectly(op1, op2); - final BidirectionalBinding binding3 = func.createBindingDirectly(op2, op1); - final BidirectionalBinding binding4 = func.createBindingDirectly(op2, op1); - op1 = null; - System.gc(); - - assertTrue(binding1.equals(binding1)); - assertFalse(binding1.equals(binding2)); - assertFalse(binding1.equals(binding3)); - - assertTrue(binding3.equals(binding3)); - assertFalse(binding3.equals(binding1)); - assertFalse(binding3.equals(binding4)); - } - - @Test(expected=NullPointerException.class) - public void testBind_Null_X() { - func.bind(null, op2); - } - - @Test(expected=NullPointerException.class) - public void testBind_X_Null() { - func.bind(op1, null); - } - - @Test(expected=IllegalArgumentException.class) - public void testBind_X_Self() { - func.bind(op1, op1); - } - - @Test(expected=NullPointerException.class) - public void testUnbind_Null_X() { - func.unbind(null, op2); - } - - @Test(expected=NullPointerException.class) - public void testUnbind_X_Null() { - func.unbind(op1, null); - } - - @Test(expected=IllegalArgumentException.class) - public void testUnbind_X_Self() { - func.unbind(op1, op1); - } - - @Test - public void testBrokenBind() { - func.bind(op1, op2); - op1.bind(op3); - assertEquals(op3.getValue(), op1.getValue()); - assertEquals(op2.getValue(), op1.getValue()); - - op2.setValue(v[2]); - assertEquals(op3.getValue(), op1.getValue()); - assertEquals(op2.getValue(), op1.getValue()); - } - - @Test - public void testDoubleBrokenBind() { - func.bind(op1, op2); - op1.bind(op3); - op4.setValue(v[0]); - - op2.bind(op4); - assertEquals(op4.getValue(), op2.getValue()); - assertEquals(op3.getValue(), op1.getValue()); - // Test that bidirectional binding was unbound in this case - op3.setValue(v[0]); - op4.setValue(v[1]); - assertEquals(op4.getValue(), op2.getValue()); - assertEquals(op3.getValue(), op1.getValue()); - assertEquals(v[0], op1.getValue()); - assertEquals(v[1], op2.getValue()); - } - + Bindings.bindBidirectional(op1, op2); + Bindings.bindBidirectional(op1, op2); + System.gc(); // making sure we did not not overdo weak references + assertEquals(v[1], op1.getValue()); + assertEquals(v[1], op2.getValue()); + + op1.setValue(v[2]); + assertEquals(v[2], op1.getValue()); + assertEquals(v[2], op2.getValue()); + + op2.setValue(v[3]); + assertEquals(v[3], op1.getValue()); + assertEquals(v[3], op2.getValue()); + } + + @Test + public void testUnbind() { + // unbind non-existing binding => no-op + Bindings.unbindBidirectional(op1, op2); + + // unbind properties of different beans + Bindings.bindBidirectional(op1, op2); + System.gc(); // making sure we did not not overdo weak references + assertEquals(v[1], op1.getValue()); + assertEquals(v[1], op2.getValue()); + + Bindings.unbindBidirectional(op1, op2); + System.gc(); + assertEquals(v[1], op1.getValue()); + assertEquals(v[1], op2.getValue()); + + op1.setValue(v[2]); + assertEquals(v[2], op1.getValue()); + assertEquals(v[1], op2.getValue()); + + op2.setValue(v[3]); + assertEquals(v[2], op1.getValue()); + assertEquals(v[3], op2.getValue()); + } + + @Test + public void testChaining() { + op3.setValue(v[2]); + Bindings.bindBidirectional(op1, op2); + Bindings.bindBidirectional(op2, op3); + System.gc(); // making sure we did not not overdo weak references + assertEquals(v[2], op1.getValue()); + assertEquals(v[2], op2.getValue()); + assertEquals(v[2], op3.getValue()); + + op1.setValue(v[3]); + assertEquals(v[3], op1.getValue()); + assertEquals(v[3], op2.getValue()); + assertEquals(v[3], op3.getValue()); + + op2.setValue(v[0]); + assertEquals(v[0], op1.getValue()); + assertEquals(v[0], op2.getValue()); + assertEquals(v[0], op3.getValue()); + + op3.setValue(v[1]); + assertEquals(v[1], op1.getValue()); + assertEquals(v[1], op2.getValue()); + assertEquals(v[1], op3.getValue()); + + // now unbind + Bindings.unbindBidirectional(op1, op2); + System.gc(); // making sure we did not not overdo weak references + assertEquals(v[1], op1.getValue()); + assertEquals(v[1], op2.getValue()); + assertEquals(v[1], op3.getValue()); + + op1.setValue(v[2]); + assertEquals(v[2], op1.getValue()); + assertEquals(v[1], op2.getValue()); + assertEquals(v[1], op3.getValue()); + + op2.setValue(v[3]); + assertEquals(v[2], op1.getValue()); + assertEquals(v[3], op2.getValue()); + assertEquals(v[3], op3.getValue()); + + op3.setValue(v[0]); + assertEquals(v[2], op1.getValue()); + assertEquals(v[0], op2.getValue()); + assertEquals(v[0], op3.getValue()); + } + + private int getListenerCount(ObservableValue v) { + return ExpressionHelperUtility.getChangeListeners(v).size(); + } + + @Test + public void testWeakReferencing() { + Bindings.bindBidirectional(op1, op2); + + assertEquals(1, getListenerCount(op1)); + assertEquals(1, getListenerCount(op2)); + + op1 = null; + System.gc(); + op2.setValue(v[2]); + assertEquals(0, getListenerCount(op2)); + + Bindings.bindBidirectional(op2, op3); + assertEquals(1, getListenerCount(op2)); + assertEquals(1, getListenerCount(op3)); + + op3 = null; + System.gc(); + op2.setValue(v[0]); + assertEquals(0, getListenerCount(op2)); + } + + @Test + public void testHashCode() { + final int hc1 = BidirectionalBinding.bind(op1, op2).hashCode(); + final int hc2 = BidirectionalBinding.bind(op2, op1).hashCode(); + assertEquals(hc1, hc2); + } + + @Test + public void testEquals() { + final BidirectionalBinding golden = BidirectionalBinding.bind(op1, op2); + + assertTrue(golden.equals(golden)); + assertFalse(golden.equals(null)); + assertFalse(golden.equals(op1)); + assertTrue(golden.equals(BidirectionalBinding.bind(op1, op2))); + assertTrue(golden.equals(BidirectionalBinding.bind(op2, op1))); + assertFalse(golden.equals(BidirectionalBinding.bind(op1, op3))); + assertFalse(golden.equals(BidirectionalBinding.bind(op3, op1))); + assertFalse(golden.equals(BidirectionalBinding.bind(op3, op2))); + assertFalse(golden.equals(BidirectionalBinding.bind(op2, op3))); + } + + @Test + public void testEqualsWithGCedProperty() { + final BidirectionalBinding binding1 = BidirectionalBinding.bind(op1, op2); + final BidirectionalBinding binding2 = BidirectionalBinding.bind(op1, op2); + final BidirectionalBinding binding3 = BidirectionalBinding.bind(op2, op1); + final BidirectionalBinding binding4 = BidirectionalBinding.bind(op2, op1); + op1 = null; + System.gc(); + + assertTrue(binding1.equals(binding1)); + assertFalse(binding1.equals(binding2)); + assertFalse(binding1.equals(binding3)); + + assertTrue(binding3.equals(binding3)); + assertFalse(binding3.equals(binding1)); + assertFalse(binding3.equals(binding4)); + } + + @Test(expected=NullPointerException.class) + public void testBind_Null_X() { + Bindings.bindBidirectional(null, op2); + } + + @Test(expected=NullPointerException.class) + public void testBind_X_Null() { + Bindings.bindBidirectional(op1, null); + } + + @Test(expected=IllegalArgumentException.class) + public void testBind_X_Self() { + Bindings.bindBidirectional(op1, op1); + } + + @Test(expected=NullPointerException.class) + public void testUnbind_Null_X() { + Bindings.unbindBidirectional(null, op2); + } + + @Test(expected=NullPointerException.class) + public void testUnbind_X_Null() { + Bindings.unbindBidirectional(op1, null); + } + + @Test(expected=IllegalArgumentException.class) + public void testUnbind_X_Self() { + Bindings.unbindBidirectional(op1, op1); + } + + @Test + public void testBrokenBind() { + Bindings.bindBidirectional(op1, op2); + op1.bind(op3); + assertEquals(op3.getValue(), op1.getValue()); + assertEquals(op2.getValue(), op1.getValue()); + + op2.setValue(v[2]); + assertEquals(op3.getValue(), op1.getValue()); + assertEquals(op2.getValue(), op1.getValue()); + } + + @Test + public void testDoubleBrokenBind() { + Bindings.bindBidirectional(op1, op2); + op1.bind(op3); + op4.setValue(v[0]); + + op2.bind(op4); + assertEquals(op4.getValue(), op2.getValue()); + assertEquals(op3.getValue(), op1.getValue()); + // Test that bidirectional binding was unbound in this case + op3.setValue(v[0]); + op4.setValue(v[1]); + assertEquals(op4.getValue(), op2.getValue()); + assertEquals(op3.getValue(), op1.getValue()); + assertEquals(v[0], op1.getValue()); + assertEquals(v[1], op2.getValue()); + } + @Parameterized.Parameters public static Collection parameters() { final Boolean[] booleanData = new Boolean[] {true, false, true, false}; @@ -303,346 +311,20 @@ final String[] stringData = new String[] {"A", "B", "C", "D"}; return Arrays.asList(new Object[][] { - // boolean - { - new Functions() { - @Override - public PropertyMock create() { - return new BooleanPropertyMock(); - } - @Override - public void bind(PropertyMock op1, PropertyMock op2) { - Bindings.bindBidirectional(op1, op2); - } - @Override - public void unbind(PropertyMock op1, PropertyMock op2) { - Bindings.unbindBidirectional(op1, op2); - } - @Override - public BidirectionalBinding createBindingDirectly(PropertyMock op1, PropertyMock op2) { - return BidirectionalBinding.bind(op1, op2); - } - @Override - public void check(Boolean expected, Boolean actual) { - assertEquals(expected, actual); - } - }, - booleanData - }, - // double - { - new Functions() { - @Override - public PropertyMock create() { - return new DoublePropertyMock(); - } - @Override - public void bind(PropertyMock op1, PropertyMock op2) { - Bindings.bindBidirectional(op1, op2); - } - @Override - public void unbind(PropertyMock op1, PropertyMock op2) { - Bindings.unbindBidirectional(op1, op2); - } - @Override - public BidirectionalBinding createBindingDirectly(PropertyMock op1, PropertyMock op2) { - return BidirectionalBinding.bind(op1, op2); - } - @Override - public void check(Number expected, Number actual) { - assertEquals(expected.doubleValue(), actual.doubleValue(), EPSILON_DOUBLE); - } - }, - doubleData - }, - // float - { - new Functions() { - @Override - public PropertyMock create() { - return new FloatPropertyMock(); - } - @Override - public void bind(PropertyMock op1, PropertyMock op2) { - Bindings.bindBidirectional(op1, op2); - } - @Override - public void unbind(PropertyMock op1, PropertyMock op2) { - Bindings.unbindBidirectional(op1, op2); - } - @Override - public BidirectionalBinding createBindingDirectly(PropertyMock op1, PropertyMock op2) { - return BidirectionalBinding.bind(op1, op2); - } - @Override - public void check(Number expected, Number actual) { - assertEquals(expected.floatValue(), actual.floatValue(), EPSILON_FLOAT); - } - }, - floatData - }, - // integer - { - new Functions() { - @Override - public PropertyMock create() { - return new IntegerPropertyMock(); - } - @Override - public void bind(PropertyMock op1, PropertyMock op2) { - Bindings.bindBidirectional(op1, op2); - } - @Override - public void unbind(PropertyMock op1, PropertyMock op2) { - Bindings.unbindBidirectional(op1, op2); - } - @Override - public BidirectionalBinding createBindingDirectly(PropertyMock op1, PropertyMock op2) { - return BidirectionalBinding.bind(op1, op2); - } - @Override - public void check(Number expected, Number actual) { - assertEquals(expected.intValue(), actual.intValue()); - } - }, - integerData - }, - // long - { - new Functions() { - @Override - public PropertyMock create() { - return new LongPropertyMock(); - } - @Override - public void bind(PropertyMock op1, PropertyMock op2) { - Bindings.bindBidirectional(op1, op2); - } - @Override - public void unbind(PropertyMock op1, PropertyMock op2) { - Bindings.unbindBidirectional(op1, op2); - } - @Override - public BidirectionalBinding createBindingDirectly(PropertyMock op1, PropertyMock op2) { - return BidirectionalBinding.bind(op1, op2); - } - @Override - public void check(Number expected, Number actual) { - assertEquals(expected.longValue(), actual.longValue()); - } - }, - longData - }, - // object - { - new Functions() { - @Override - public PropertyMock create() { - return new ObjectPropertyMock(); - } - @Override - public void bind(PropertyMock op1, PropertyMock op2) { - Bindings.bindBidirectional(op1, op2); - } - @Override - public void unbind(PropertyMock op1, PropertyMock op2) { - Bindings.unbindBidirectional(op1, op2); - } - @Override - public BidirectionalBinding createBindingDirectly(PropertyMock op1, PropertyMock op2) { - return BidirectionalBinding.bind(op1, op2); - } - @Override - public void check(Object expected, Object actual) { - assertEquals(expected, actual); - } - }, - objectData - }, - // string - { - new Functions() { - @Override - public PropertyMock create() { - return new StringPropertyMock(); - } - @Override - public void bind(PropertyMock op1, PropertyMock op2) { - Bindings.bindBidirectional(op1, op2); - } - @Override - public void unbind(PropertyMock op1, PropertyMock op2) { - Bindings.unbindBidirectional(op1, op2); - } - @Override - public BidirectionalBinding createBindingDirectly(PropertyMock op1, PropertyMock op2) { - return BidirectionalBinding.bind(op1, op2); - } - @Override - public void check(String expected, String actual) { - assertEquals(expected, actual); - } - }, - stringData - }, + { new Factory(() -> new SimpleBooleanProperty(), booleanData) }, + { new Factory(() -> new SimpleDoubleProperty(), doubleData) }, + { new Factory(() -> new SimpleFloatProperty(), floatData) }, + { new Factory(() -> new SimpleIntegerProperty(), integerData) }, + { new Factory(() -> new SimpleLongProperty(), longData) }, + { new Factory(() -> new SimpleObjectProperty<>(), objectData) }, + { new Factory(() -> new SimpleStringProperty(), stringData) }, + { new Factory(() -> new ReadOnlyBooleanWrapper(), booleanData) }, + { new Factory(() -> new ReadOnlyDoubleWrapper(), doubleData) }, + { new Factory(() -> new ReadOnlyFloatWrapper(), floatData) }, + { new Factory(() -> new ReadOnlyIntegerWrapper(), integerData) }, + { new Factory(() -> new ReadOnlyLongWrapper(), longData) }, + { new Factory(() -> new ReadOnlyObjectWrapper<>(), objectData) }, + { new Factory(() -> new ReadOnlyStringWrapper(), stringData) }, }); } - - private interface PropertyMock extends Property { - int getListenerCount(); - } - - private static class BooleanPropertyMock extends SimpleBooleanProperty implements PropertyMock { - - private int listenerCount = 0; - - @Override - public int getListenerCount() { - return listenerCount; - } - - @Override - public void addListener(ChangeListener listener) { - super.addListener(listener); - listenerCount++; - } - - @Override - public void removeListener(ChangeListener listener) { - super.removeListener(listener); - listenerCount--; - } - } - - private static class DoublePropertyMock extends SimpleDoubleProperty implements PropertyMock { - - private int listenerCount = 0; - - @Override - public int getListenerCount() { - return listenerCount; - } - - @Override - public void addListener(ChangeListener listener) { - super.addListener(listener); - listenerCount++; - } - - @Override - public void removeListener(ChangeListener listener) { - super.removeListener(listener); - listenerCount--; - } - } - - private static class FloatPropertyMock extends SimpleFloatProperty implements PropertyMock { - - private int listenerCount = 0; - - @Override - public int getListenerCount() { - return listenerCount; - } - - @Override - public void addListener(ChangeListener listener) { - super.addListener(listener); - listenerCount++; - } - - @Override - public void removeListener(ChangeListener listener) { - super.removeListener(listener); - listenerCount--; - } - } - - private static class IntegerPropertyMock extends SimpleIntegerProperty implements PropertyMock { - - private int listenerCount = 0; - - @Override - public int getListenerCount() { - return listenerCount; - } - - @Override - public void addListener(ChangeListener listener) { - super.addListener(listener); - listenerCount++; - } - - @Override - public void removeListener(ChangeListener listener) { - super.removeListener(listener); - listenerCount--; - } - } - - private static class LongPropertyMock extends SimpleLongProperty implements PropertyMock { - - private int listenerCount = 0; - - @Override - public int getListenerCount() { - return listenerCount; - } - - @Override - public void addListener(ChangeListener listener) { - super.addListener(listener); - listenerCount++; - } - - @Override - public void removeListener(ChangeListener listener) { - super.removeListener(listener); - listenerCount--; - } - } - - private static class ObjectPropertyMock extends SimpleObjectProperty implements PropertyMock { - - private int listenerCount = 0; - - @Override - public int getListenerCount() { - return listenerCount; - } - - @Override - public void addListener(ChangeListener listener) { - super.addListener(listener); - listenerCount++; - } - - @Override - public void removeListener(ChangeListener listener) { - super.removeListener(listener); - listenerCount--; - } - } - - private static class StringPropertyMock extends SimpleStringProperty implements PropertyMock { - - private int listenerCount = 0; - - @Override - public int getListenerCount() { - return listenerCount; - } - - @Override - public void addListener(ChangeListener listener) { - super.addListener(listener); - listenerCount++; - } - - @Override - public void removeListener(ChangeListener listener) { - super.removeListener(listener); - listenerCount--; - } - } } --- old/modules/base/src/test/java/javafx/beans/property/ReadOnlyBooleanWrapperTest.java 2015-08-04 14:45:02.069483400 +0300 +++ new/modules/base/src/test/java/javafx/beans/property/ReadOnlyBooleanWrapperTest.java 2015-08-04 14:45:01.732458400 +0300 @@ -155,7 +155,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -172,7 +172,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -185,7 +185,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -200,7 +200,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -239,7 +239,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -256,7 +256,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -269,7 +269,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -284,7 +284,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -331,7 +331,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -339,7 +339,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -348,7 +348,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -357,7 +357,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -371,14 +371,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -386,7 +386,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -394,7 +394,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -443,7 +443,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -451,7 +451,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -460,7 +460,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -469,7 +469,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -483,14 +483,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -498,7 +498,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -506,7 +506,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -568,7 +568,7 @@ assertEquals(VALUE_2, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -576,7 +576,7 @@ v2.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -623,7 +623,7 @@ property.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -641,7 +641,7 @@ property.addListener(internalListener2); internalListener2.reset(); property.set(VALUE_2); - internalListener2.check(readOnlyProperty, 1); + internalListener2.check(property, 1); // setting the property, checking public property.set(VALUE_1); @@ -657,7 +657,7 @@ v.get(); internalListener3.reset(); v.set(VALUE_1); - internalListener3.check(readOnlyProperty, 1); + internalListener3.check(property, 1); // binding the property, checking public property.bind(v); --- old/modules/base/src/test/java/javafx/beans/property/ReadOnlyDoubleWrapperTest.java 2015-08-04 14:45:04.845708900 +0300 +++ new/modules/base/src/test/java/javafx/beans/property/ReadOnlyDoubleWrapperTest.java 2015-08-04 14:45:04.503182700 +0300 @@ -156,7 +156,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -173,7 +173,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -186,7 +186,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); // set same value again @@ -201,7 +201,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); } @@ -240,7 +240,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -257,7 +257,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -270,7 +270,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); // set same value again @@ -285,7 +285,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); } @@ -332,7 +332,7 @@ assertEquals(VALUE_1, property.get(), EPSILON); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -340,7 +340,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -349,7 +349,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -358,7 +358,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -372,14 +372,14 @@ assertEquals(VALUE_1, property.get(), EPSILON); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); // change binding twice without reading @@ -387,7 +387,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); // change binding twice to same value @@ -395,7 +395,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); } @@ -444,7 +444,7 @@ assertEquals(VALUE_1, property.get(), EPSILON); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -452,7 +452,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -461,7 +461,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -470,7 +470,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -484,14 +484,14 @@ assertEquals(VALUE_1, property.get(), EPSILON); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); // change binding twice without reading @@ -499,7 +499,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); // change binding twice to same value @@ -507,7 +507,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); } @@ -569,7 +569,7 @@ assertEquals(VALUE_2, property.get(), EPSILON); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -577,7 +577,7 @@ v2.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -624,7 +624,7 @@ property.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -642,7 +642,7 @@ property.addListener(internalListener2); internalListener2.reset(); property.set(VALUE_2); - internalListener2.check(readOnlyProperty, 1); + internalListener2.check(property, 1); // setting the property, checking public property.set(VALUE_1); @@ -658,7 +658,7 @@ v.get(); internalListener3.reset(); v.set(VALUE_1); - internalListener3.check(readOnlyProperty, 1); + internalListener3.check(property, 1); // binding the property, checking public property.bind(v); --- old/modules/base/src/test/java/javafx/beans/property/ReadOnlyFloatWrapperTest.java 2015-08-04 14:45:07.695936600 +0300 +++ new/modules/base/src/test/java/javafx/beans/property/ReadOnlyFloatWrapperTest.java 2015-08-04 14:45:07.367912100 +0300 @@ -156,7 +156,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -173,7 +173,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -186,7 +186,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); // set same value again @@ -201,7 +201,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); } @@ -240,7 +240,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -257,7 +257,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -270,7 +270,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); // set same value again @@ -285,7 +285,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); } @@ -332,7 +332,7 @@ assertEquals(VALUE_1, property.get(), EPSILON); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -340,7 +340,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -349,7 +349,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -358,7 +358,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -372,14 +372,14 @@ assertEquals(VALUE_1, property.get(), EPSILON); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); // change binding twice without reading @@ -387,7 +387,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); // change binding twice to same value @@ -395,7 +395,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); } @@ -444,7 +444,7 @@ assertEquals(VALUE_1, property.get(), EPSILON); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -452,7 +452,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -461,7 +461,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -470,7 +470,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -484,14 +484,14 @@ assertEquals(VALUE_1, property.get(), EPSILON); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); // change binding twice without reading @@ -499,7 +499,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); // change binding twice to same value @@ -507,7 +507,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); } @@ -569,7 +569,7 @@ assertEquals(VALUE_2, property.get(), EPSILON); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -577,7 +577,7 @@ v2.set(VALUE_1); assertEquals(VALUE_1, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); @@ -624,7 +624,7 @@ property.set(VALUE_2); assertEquals(VALUE_2, property.get(), EPSILON); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get(), EPSILON); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -642,7 +642,7 @@ property.addListener(internalListener2); internalListener2.reset(); property.set(VALUE_2); - internalListener2.check(readOnlyProperty, 1); + internalListener2.check(property, 1); // setting the property, checking public property.set(VALUE_1); @@ -658,7 +658,7 @@ v.get(); internalListener3.reset(); v.set(VALUE_1); - internalListener3.check(readOnlyProperty, 1); + internalListener3.check(property, 1); // binding the property, checking public property.bind(v); --- old/modules/base/src/test/java/javafx/beans/property/ReadOnlyIntegerWrapperTest.java 2015-08-04 14:45:10.267119300 +0300 +++ new/modules/base/src/test/java/javafx/beans/property/ReadOnlyIntegerWrapperTest.java 2015-08-04 14:45:09.927094000 +0300 @@ -155,7 +155,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -172,7 +172,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -185,7 +185,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -200,7 +200,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -239,7 +239,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -256,7 +256,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -269,7 +269,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -284,7 +284,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -331,7 +331,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -339,7 +339,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -348,7 +348,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -357,7 +357,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -371,14 +371,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -386,7 +386,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -394,7 +394,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -443,7 +443,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -451,7 +451,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -460,7 +460,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -469,7 +469,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -483,14 +483,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -498,7 +498,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -506,7 +506,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -568,7 +568,7 @@ assertEquals(VALUE_2, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -576,7 +576,7 @@ v2.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -623,7 +623,7 @@ property.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -641,7 +641,7 @@ property.addListener(internalListener2); internalListener2.reset(); property.set(VALUE_2); - internalListener2.check(readOnlyProperty, 1); + internalListener2.check(property, 1); // setting the property, checking public property.set(VALUE_1); @@ -657,7 +657,7 @@ v.get(); internalListener3.reset(); v.set(VALUE_1); - internalListener3.check(readOnlyProperty, 1); + internalListener3.check(property, 1); // binding the property, checking public property.bind(v); --- old/modules/base/src/test/java/javafx/beans/property/ReadOnlyListWrapperTest.java 2015-08-04 14:45:12.982329800 +0300 +++ new/modules/base/src/test/java/javafx/beans/property/ReadOnlyListWrapperTest.java 2015-08-04 14:45:12.621294300 +0300 @@ -153,7 +153,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -170,7 +170,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -183,7 +183,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -198,7 +198,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -237,7 +237,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -254,7 +254,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -267,7 +267,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -282,7 +282,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -329,7 +329,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -337,7 +337,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -346,7 +346,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -355,7 +355,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -369,14 +369,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -384,7 +384,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -392,7 +392,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -441,7 +441,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -449,7 +449,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -458,7 +458,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -467,7 +467,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -481,14 +481,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -496,7 +496,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -504,7 +504,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -566,7 +566,7 @@ assertEquals(VALUE_2, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -574,7 +574,7 @@ v2.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -621,7 +621,7 @@ property.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -639,7 +639,7 @@ property.addListener(internalListener2); internalListener2.reset(); property.set(VALUE_2); - internalListener2.check(readOnlyProperty, 1); + internalListener2.check(property, 1); // setting the property, checking public property.set(VALUE_1); @@ -655,7 +655,7 @@ v.get(); internalListener3.reset(); v.set(VALUE_1); - internalListener3.check(readOnlyProperty, 1); + internalListener3.check(property, 1); // binding the property, checking public property.bind(v); --- old/modules/base/src/test/java/javafx/beans/property/ReadOnlyLongWrapperTest.java 2015-08-04 14:45:15.935086000 +0300 +++ new/modules/base/src/test/java/javafx/beans/property/ReadOnlyLongWrapperTest.java 2015-08-04 14:45:15.481034100 +0300 @@ -155,7 +155,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -172,7 +172,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -185,7 +185,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -200,7 +200,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -239,7 +239,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -256,7 +256,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -269,7 +269,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -284,7 +284,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -331,7 +331,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -339,7 +339,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -348,7 +348,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -357,7 +357,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -371,14 +371,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -386,7 +386,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -394,7 +394,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -443,7 +443,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -451,7 +451,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -460,7 +460,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -469,7 +469,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -483,14 +483,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -498,7 +498,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -506,7 +506,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -568,7 +568,7 @@ assertEquals(VALUE_2, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -576,7 +576,7 @@ v2.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -623,7 +623,7 @@ property.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -641,7 +641,7 @@ property.addListener(internalListener2); internalListener2.reset(); property.set(VALUE_2); - internalListener2.check(readOnlyProperty, 1); + internalListener2.check(property, 1); // setting the property, checking public property.set(VALUE_1); @@ -657,7 +657,7 @@ v.get(); internalListener3.reset(); v.set(VALUE_1); - internalListener3.check(readOnlyProperty, 1); + internalListener3.check(property, 1); // binding the property, checking public property.bind(v); --- old/modules/base/src/test/java/javafx/beans/property/ReadOnlyMapWrapperTest.java 2015-08-04 14:45:18.743805800 +0300 +++ new/modules/base/src/test/java/javafx/beans/property/ReadOnlyMapWrapperTest.java 2015-08-04 14:45:18.377776400 +0300 @@ -155,7 +155,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -172,7 +172,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -185,7 +185,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -200,7 +200,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -239,7 +239,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -256,7 +256,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -269,7 +269,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -284,7 +284,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -331,7 +331,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -339,7 +339,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -348,7 +348,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -357,7 +357,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -371,14 +371,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -386,7 +386,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -394,7 +394,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -443,7 +443,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -451,7 +451,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -460,7 +460,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -469,7 +469,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -483,14 +483,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -498,7 +498,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -506,7 +506,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -568,7 +568,7 @@ assertEquals(VALUE_2, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -576,7 +576,7 @@ v2.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -623,7 +623,7 @@ property.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -641,7 +641,7 @@ property.addListener(internalListener2); internalListener2.reset(); property.set(VALUE_2); - internalListener2.check(readOnlyProperty, 1); + internalListener2.check(property, 1); // setting the property, checking public property.set(VALUE_1); @@ -657,7 +657,7 @@ v.get(); internalListener3.reset(); v.set(VALUE_1); - internalListener3.check(readOnlyProperty, 1); + internalListener3.check(property, 1); // binding the property, checking public property.bind(v); --- old/modules/base/src/test/java/javafx/beans/property/ReadOnlyObjectWrapperTest.java 2015-08-04 14:45:21.239986300 +0300 +++ new/modules/base/src/test/java/javafx/beans/property/ReadOnlyObjectWrapperTest.java 2015-08-04 14:45:20.934968800 +0300 @@ -154,7 +154,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -171,7 +171,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -184,7 +184,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -199,7 +199,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -238,7 +238,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -255,7 +255,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -268,7 +268,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -283,7 +283,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -330,7 +330,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -338,7 +338,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -347,7 +347,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -356,7 +356,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -370,14 +370,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -385,7 +385,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -393,7 +393,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -442,7 +442,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -450,7 +450,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -459,7 +459,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -468,7 +468,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -482,14 +482,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -497,7 +497,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -505,7 +505,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -567,7 +567,7 @@ assertEquals(VALUE_2, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -575,7 +575,7 @@ v2.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -622,7 +622,7 @@ property.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -640,7 +640,7 @@ property.addListener(internalListener2); internalListener2.reset(); property.set(VALUE_2); - internalListener2.check(readOnlyProperty, 1); + internalListener2.check(property, 1); // setting the property, checking public property.set(VALUE_1); @@ -656,7 +656,7 @@ v.get(); internalListener3.reset(); v.set(VALUE_1); - internalListener3.check(readOnlyProperty, 1); + internalListener3.check(property, 1); // binding the property, checking public property.bind(v); --- old/modules/base/src/test/java/javafx/beans/property/ReadOnlySetWrapperTest.java 2015-08-04 14:45:23.895191900 +0300 +++ new/modules/base/src/test/java/javafx/beans/property/ReadOnlySetWrapperTest.java 2015-08-04 14:45:23.437135200 +0300 @@ -153,7 +153,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -170,7 +170,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -183,7 +183,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -198,7 +198,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -237,7 +237,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -254,7 +254,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -267,7 +267,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -282,7 +282,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -329,7 +329,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -337,7 +337,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -346,7 +346,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -355,7 +355,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -369,14 +369,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -384,7 +384,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -392,7 +392,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -441,7 +441,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -449,7 +449,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -458,7 +458,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -467,7 +467,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -481,14 +481,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -496,7 +496,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -504,7 +504,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -566,7 +566,7 @@ assertEquals(VALUE_2, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -574,7 +574,7 @@ v2.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -621,7 +621,7 @@ property.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -639,7 +639,7 @@ property.addListener(internalListener2); internalListener2.reset(); property.set(VALUE_2); - internalListener2.check(readOnlyProperty, 1); + internalListener2.check(property, 1); // setting the property, checking public property.set(VALUE_1); @@ -655,7 +655,7 @@ v.get(); internalListener3.reset(); v.set(VALUE_1); - internalListener3.check(readOnlyProperty, 1); + internalListener3.check(property, 1); // binding the property, checking public property.bind(v); --- old/modules/base/src/test/java/javafx/beans/property/ReadOnlyStringWrapperTest.java 2015-08-04 14:45:27.051470900 +0300 +++ new/modules/base/src/test/java/javafx/beans/property/ReadOnlyStringWrapperTest.java 2015-08-04 14:45:26.710440100 +0300 @@ -155,7 +155,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -172,7 +172,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -185,7 +185,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -200,7 +200,7 @@ property.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -239,7 +239,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -256,7 +256,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -269,7 +269,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // set same value again @@ -284,7 +284,7 @@ property.setValue(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 2); + internalChangeListener.check(property, VALUE_2, VALUE_1, 2); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -331,7 +331,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -339,7 +339,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -348,7 +348,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -357,7 +357,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -371,14 +371,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -386,7 +386,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -394,7 +394,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -443,7 +443,7 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -451,7 +451,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -460,7 +460,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -469,7 +469,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -483,14 +483,14 @@ assertEquals(VALUE_1, property.get()); assertTrue(property.isBound()); property.check(1); - internalChangeListener.check(readOnlyProperty, DEFAULT, VALUE_1, 1); + internalChangeListener.check(property, DEFAULT, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); // change binding once v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 1); + internalChangeListener.check(property, VALUE_1, VALUE_2, 1); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice without reading @@ -498,7 +498,7 @@ v.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_1, VALUE_2, 2); + internalChangeListener.check(property, VALUE_1, VALUE_2, 2); assertEquals(VALUE_2, readOnlyProperty.get()); // change binding twice to same value @@ -506,7 +506,7 @@ v.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(2); - internalChangeListener.check(readOnlyProperty, VALUE_2, VALUE_1, 1); + internalChangeListener.check(property, VALUE_2, VALUE_1, 1); assertEquals(VALUE_1, readOnlyProperty.get()); } @@ -568,7 +568,7 @@ assertEquals(VALUE_2, property.get()); assertTrue(property.isBound()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -576,7 +576,7 @@ v2.set(VALUE_1); assertEquals(VALUE_1, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_1, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); @@ -623,7 +623,7 @@ property.set(VALUE_2); assertEquals(VALUE_2, property.get()); property.check(1); - internalInvalidationListener.check(readOnlyProperty, 1); + internalInvalidationListener.check(property, 1); assertEquals(VALUE_2, readOnlyProperty.get()); publicInvalidationListener.check(readOnlyProperty, 1); } @@ -641,7 +641,7 @@ property.addListener(internalListener2); internalListener2.reset(); property.set(VALUE_2); - internalListener2.check(readOnlyProperty, 1); + internalListener2.check(property, 1); // setting the property, checking public property.set(VALUE_1); @@ -657,7 +657,7 @@ v.get(); internalListener3.reset(); v.set(VALUE_1); - internalListener3.check(readOnlyProperty, 1); + internalListener3.check(property, 1); // binding the property, checking public property.bind(v);