The problem is that ListProperty (and associated classes) don't reimplement equals(). As a consequence, Object.equals is being used. This does instance equality. But this is wrong when compared with a list, instead it should do list element equality. Otherwise, we don't have transitive equality.
[junit] Testsuite: javafx.beans.property.ListPropertyBaseTest
[junit] Tests run: 24, Failures: 4, Errors: 0, Time elapsed: 0.119 sec
[junit]
[junit] Testcase: testBind_ListChange(javafx.beans.property.ListPropertyBaseTest): FAILED
[junit] expected:<ListProperty [bound, value: []]> but was:<[]>
[junit] junit.framework.AssertionFailedError: expected:<ListProperty [bound, value: []]> but was:<[]>
[junit] at javafx.collections.MockListObserver.checkAddRemove(MockListObserver.java:102)
[junit] at javafx.collections.MockListObserver.check1AddRemove(MockListObserver.java:90)
[junit] at javafx.beans.property.ListPropertyBaseTest.testBind_ListChange(ListPropertyBaseTest.java:556)
[junit]
[junit]
[junit] Testcase: testListChangeListener(javafx.beans.property.ListPropertyBaseTest): FAILED
[junit] expected:<ListProperty [value: [java.lang.Object@cf768c, java.lang.Object@1f95c5d]]> but was:<[java.lang.Object@cf768c, java.lang.Object@1f95c5d]>
[junit] junit.framework.AssertionFailedError: expected:<ListProperty [value: [java.lang.Object@cf768c, java.lang.Object@1f95c5d]]> but was:<[java.lang.Object@cf768c, java.lang.Object@1f95c5d]>
[junit] at javafx.collections.MockListObserver.checkAddRemove(MockListObserver.java:102)
[junit] at javafx.collections.MockListObserver.check1AddRemove(MockListObserver.java:90)
[junit] at javafx.beans.property.ListPropertyBaseTest.testListChangeListener(ListPropertyBaseTest.java:150)
[junit]
[junit]
[junit] Testcase: testSet_ListChange(javafx.beans.property.ListPropertyBaseTest): FAILED
[junit] expected:<ListProperty [value: [java.lang.Object@cf768c, java.lang.Object@1f95c5d]]> but was:<[java.lang.Object@cf768c, java.lang.Object@1f95c5d]>
[junit] junit.framework.AssertionFailedError: expected:<ListProperty [value: [java.lang.Object@cf768c, java.lang.Object@1f95c5d]]> but was:<[java.lang.Object@cf768c, java.lang.Object@1f95c5d]>
[junit] at javafx.collections.MockListObserver.checkAddRemove(MockListObserver.java:102)
[junit] at javafx.collections.MockListObserver.check1AddRemove(MockListObserver.java:90)
[junit] at javafx.beans.property.ListPropertyBaseTest.testSet_ListChange(ListPropertyBaseTest.java:384)
[junit]
[junit]
[junit] Testcase: testSetValue_ListChange(javafx.beans.property.ListPropertyBaseTest): FAILED
[junit] expected:<ListProperty [value: [java.lang.Object@cf768c, java.lang.Object@1f95c5d]]> but was:<[java.lang.Object@cf768c, java.lang.Object@1f95c5d]>
[junit] junit.framework.AssertionFailedError: expected:<ListProperty [value: [java.lang.Object@cf768c, java.lang.Object@1f95c5d]]> but was:<[java.lang.Object@cf768c, java.lang.Object@1f95c5d]>
[junit] at javafx.collections.MockListObserver.checkAddRemove(MockListObserver.java:102)
[junit] at javafx.collections.MockListObserver.check1AddRemove(MockListObserver.java:90)
[junit] at javafx.beans.property.ListPropertyBaseTest.testSetValue_ListChange(ListPropertyBaseTest.java:458)
[junit]
[junit] Testsuite: javafx.beans.property.ListPropertyBaseTest
[junit] Tests run: 24, Failures: 4, Errors: 0, Time elapsed: 0.119 sec
[junit]
[junit] Testcase: testBind_ListChange(javafx.beans.property.ListPropertyBaseTest): FAILED
[junit] expected:<ListProperty [bound, value: []]> but was:<[]>
[junit] junit.framework.AssertionFailedError: expected:<ListProperty [bound, value: []]> but was:<[]>
[junit] at javafx.collections.MockListObserver.checkAddRemove(MockListObserver.java:102)
[junit] at javafx.collections.MockListObserver.check1AddRemove(MockListObserver.java:90)
[junit] at javafx.beans.property.ListPropertyBaseTest.testBind_ListChange(ListPropertyBaseTest.java:556)
[junit]
[junit]
[junit] Testcase: testListChangeListener(javafx.beans.property.ListPropertyBaseTest): FAILED
[junit] expected:<ListProperty [value: [java.lang.Object@cf768c, java.lang.Object@1f95c5d]]> but was:<[java.lang.Object@cf768c, java.lang.Object@1f95c5d]>
[junit] junit.framework.AssertionFailedError: expected:<ListProperty [value: [java.lang.Object@cf768c, java.lang.Object@1f95c5d]]> but was:<[java.lang.Object@cf768c, java.lang.Object@1f95c5d]>
[junit] at javafx.collections.MockListObserver.checkAddRemove(MockListObserver.java:102)
[junit] at javafx.collections.MockListObserver.check1AddRemove(MockListObserver.java:90)
[junit] at javafx.beans.property.ListPropertyBaseTest.testListChangeListener(ListPropertyBaseTest.java:150)
[junit]
[junit]
[junit] Testcase: testSet_ListChange(javafx.beans.property.ListPropertyBaseTest): FAILED
[junit] expected:<ListProperty [value: [java.lang.Object@cf768c, java.lang.Object@1f95c5d]]> but was:<[java.lang.Object@cf768c, java.lang.Object@1f95c5d]>
[junit] junit.framework.AssertionFailedError: expected:<ListProperty [value: [java.lang.Object@cf768c, java.lang.Object@1f95c5d]]> but was:<[java.lang.Object@cf768c, java.lang.Object@1f95c5d]>
[junit] at javafx.collections.MockListObserver.checkAddRemove(MockListObserver.java:102)
[junit] at javafx.collections.MockListObserver.check1AddRemove(MockListObserver.java:90)
[junit] at javafx.beans.property.ListPropertyBaseTest.testSet_ListChange(ListPropertyBaseTest.java:384)
[junit]
[junit]
[junit] Testcase: testSetValue_ListChange(javafx.beans.property.ListPropertyBaseTest): FAILED
[junit] expected:<ListProperty [value: [java.lang.Object@cf768c, java.lang.Object@1f95c5d]]> but was:<[java.lang.Object@cf768c, java.lang.Object@1f95c5d]>
[junit] junit.framework.AssertionFailedError: expected:<ListProperty [value: [java.lang.Object@cf768c, java.lang.Object@1f95c5d]]> but was:<[java.lang.Object@cf768c, java.lang.Object@1f95c5d]>
[junit] at javafx.collections.MockListObserver.checkAddRemove(MockListObserver.java:102)
[junit] at javafx.collections.MockListObserver.check1AddRemove(MockListObserver.java:90)
[junit] at javafx.beans.property.ListPropertyBaseTest.testSetValue_ListChange(ListPropertyBaseTest.java:458)
[junit]
- relates to
-
JDK-8117457 javafx-beans not being tested
-
- Resolved
-