changeset 6434:dfd9bd2f536d

TESTS ONLY: Work around Eclipse JDK8 compiler problem
author snorthov
date Thu, 06 Mar 2014 13:54:35 -0500
parents b95448553180
children 29346901e6f1
files modules/base/src/test/java/com/sun/javafx/collections/ListListenerHelperTest.java modules/base/src/test/java/com/sun/javafx/collections/MapListenerHelperTest.java modules/base/src/test/java/com/sun/javafx/collections/SetListenerHelperTest.java
diffstat 3 files changed, 19 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/modules/base/src/test/java/com/sun/javafx/collections/ListListenerHelperTest.java	Thu Mar 06 09:06:24 2014 -0700
+++ b/modules/base/src/test/java/com/sun/javafx/collections/ListListenerHelperTest.java	Thu Mar 06 13:54:35 2014 -0500
@@ -26,6 +26,7 @@
 package com.sun.javafx.collections;
 
 import com.sun.javafx.binding.ExpressionHelper;
+
 import javafx.beans.InvalidationListener;
 import javafx.beans.InvalidationListenerMock;
 import javafx.beans.Observable;
@@ -33,6 +34,7 @@
 import javafx.collections.ListChangeListener;
 import javafx.collections.MockListObserver;
 import javafx.collections.ObservableList;
+
 import org.junit.Before;
 import org.junit.Test;
 
@@ -634,7 +636,7 @@
 
     @Test
     public void testExceptionNotPropagatedFromSingleChange() {
-        helper = ListListenerHelper.addListener(helper, (ListChangeListener.Change<?> c) -> {
+        helper = ListListenerHelper.addListener(helper, (ListChangeListener.Change<? extends Object> c) -> {
             throw new RuntimeException();
         });
         helper.fireValueChangedEvent(change);
@@ -644,8 +646,8 @@
     public void testExceptionNotPropagatedFromMultipleChange() {
         BitSet called = new BitSet();
 
-        helper = ListListenerHelper.addListener(helper, (ListChangeListener.Change<?> c) -> {called.set(0); throw new RuntimeException();});
-        helper = ListListenerHelper.addListener(helper, (ListChangeListener.Change<?> c) -> {called.set(1); throw new RuntimeException();});
+        helper = ListListenerHelper.addListener(helper, (ListChangeListener.Change<? extends Object> c) -> {called.set(0); throw new RuntimeException();});
+        helper = ListListenerHelper.addListener(helper, (ListChangeListener.Change<? extends Object> c) -> {called.set(1); throw new RuntimeException();});
         helper.fireValueChangedEvent(change);
 
         assertTrue(called.get(0));
@@ -656,8 +658,8 @@
     public void testExceptionNotPropagatedFromMultipleChangeAndInvalidation() {
         BitSet called = new BitSet();
 
-        helper = ListListenerHelper.addListener(helper, (ListChangeListener.Change<?> c) -> {called.set(0); throw new RuntimeException();});
-        helper = ListListenerHelper.addListener(helper, (ListChangeListener.Change<?> c) -> {called.set(1); throw new RuntimeException();});
+        helper = ListListenerHelper.addListener(helper, (ListChangeListener.Change<? extends Object> c) -> {called.set(0); throw new RuntimeException();});
+        helper = ListListenerHelper.addListener(helper, (ListChangeListener.Change<? extends Object> c) -> {called.set(1); throw new RuntimeException();});
         helper = ListListenerHelper.addListener(helper, (Observable o) -> {called.set(2); throw new RuntimeException();});
         helper = ListListenerHelper.addListener(helper, (Observable o) -> {called.set(3); throw new RuntimeException();});
         helper.fireValueChangedEvent(change);
--- a/modules/base/src/test/java/com/sun/javafx/collections/MapListenerHelperTest.java	Thu Mar 06 09:06:24 2014 -0700
+++ b/modules/base/src/test/java/com/sun/javafx/collections/MapListenerHelperTest.java	Thu Mar 06 13:54:35 2014 -0500
@@ -26,10 +26,12 @@
 package com.sun.javafx.collections;
 
 import com.sun.javafx.binding.MapExpressionHelper;
+
 import javafx.beans.InvalidationListener;
 import javafx.beans.InvalidationListenerMock;
 import javafx.beans.Observable;
 import javafx.collections.*;
+
 import org.junit.Before;
 import org.junit.Test;
 
@@ -633,7 +635,7 @@
 
     @Test
     public void testExceptionNotPropagatedFromSingleChange() {
-        helper = MapListenerHelper.addListener(helper, (MapChangeListener.Change<?,?> c) -> {
+        helper = MapListenerHelper.addListener(helper, (MapChangeListener.Change<? extends Object,? extends Object> c) -> {
             throw new RuntimeException();
         });
         helper.fireValueChangedEvent(change);
@@ -643,8 +645,8 @@
     public void testExceptionNotPropagatedFromMultipleChange() {
         BitSet called = new BitSet();
 
-        helper = MapListenerHelper.addListener(helper, (MapChangeListener.Change<?,?> c) -> {called.set(0); throw new RuntimeException();});
-        helper = MapListenerHelper.addListener(helper, (MapChangeListener.Change<?,?> c) -> {called.set(1); throw new RuntimeException();});
+        helper = MapListenerHelper.addListener(helper, (MapChangeListener.Change<? extends Object,? extends Object> c) -> {called.set(0); throw new RuntimeException();});
+        helper = MapListenerHelper.addListener(helper, (MapChangeListener.Change<? extends Object,? extends Object> c) -> {called.set(1); throw new RuntimeException();});
         helper.fireValueChangedEvent(change);
 
         assertTrue(called.get(0));
@@ -655,8 +657,8 @@
     public void testExceptionNotPropagatedFromMultipleChangeAndInvalidation() {
         BitSet called = new BitSet();
 
-        helper = MapListenerHelper.addListener(helper, (MapChangeListener.Change<?,?> c) -> {called.set(0); throw new RuntimeException();});
-        helper = MapListenerHelper.addListener(helper, (MapChangeListener.Change<?,?> c) -> {called.set(1); throw new RuntimeException();});
+        helper = MapListenerHelper.addListener(helper, (MapChangeListener.Change<? extends Object,? extends Object> c) -> {called.set(0); throw new RuntimeException();});
+        helper = MapListenerHelper.addListener(helper, (MapChangeListener.Change<? extends Object,? extends Object> c) -> {called.set(1); throw new RuntimeException();});
         helper = MapListenerHelper.addListener(helper, (Observable o) -> {called.set(2); throw new RuntimeException();});
         helper = MapListenerHelper.addListener(helper, (Observable o) -> {called.set(3); throw new RuntimeException();});
         helper.fireValueChangedEvent(change);
--- a/modules/base/src/test/java/com/sun/javafx/collections/SetListenerHelperTest.java	Thu Mar 06 09:06:24 2014 -0700
+++ b/modules/base/src/test/java/com/sun/javafx/collections/SetListenerHelperTest.java	Thu Mar 06 13:54:35 2014 -0500
@@ -637,7 +637,7 @@
 
     @Test
     public void testExceptionNotPropagatedFromSingleChange() {
-        helper = SetListenerHelper.addListener(helper, (SetChangeListener.Change<?> c) -> {
+        helper = SetListenerHelper.addListener(helper, (SetChangeListener.Change<? extends Object> c) -> {
             throw new RuntimeException();
         });
         helper.fireValueChangedEvent(change);
@@ -647,8 +647,8 @@
     public void testExceptionNotPropagatedFromMultipleChange() {
         BitSet called = new BitSet();
 
-        helper = SetListenerHelper.addListener(helper, (SetChangeListener.Change<?> c) -> {called.set(0); throw new RuntimeException();});
-        helper = SetListenerHelper.addListener(helper, (SetChangeListener.Change<?> c) -> {called.set(1); throw new RuntimeException();});
+        helper = SetListenerHelper.addListener(helper, (SetChangeListener.Change<? extends Object> c) -> {called.set(0); throw new RuntimeException();});
+        helper = SetListenerHelper.addListener(helper, (SetChangeListener.Change<? extends Object> c) -> {called.set(1); throw new RuntimeException();});
         helper.fireValueChangedEvent(change);
 
         assertTrue(called.get(0));
@@ -659,8 +659,8 @@
     public void testExceptionNotPropagatedFromMultipleChangeAndInvalidation() {
         BitSet called = new BitSet();
 
-        helper = SetListenerHelper.addListener(helper, (SetChangeListener.Change<?> c) -> {called.set(0); throw new RuntimeException();});
-        helper = SetListenerHelper.addListener(helper, (SetChangeListener.Change<?> c) -> {called.set(1); throw new RuntimeException();});
+        helper = SetListenerHelper.addListener(helper, (SetChangeListener.Change<? extends Object> c) -> {called.set(0); throw new RuntimeException();});
+        helper = SetListenerHelper.addListener(helper, (SetChangeListener.Change<? extends Object> c) -> {called.set(1); throw new RuntimeException();});
         helper = SetListenerHelper.addListener(helper, (Observable o) -> {called.set(2); throw new RuntimeException();});
         helper = SetListenerHelper.addListener(helper, (Observable o) -> {called.set(3); throw new RuntimeException();});
         helper.fireValueChangedEvent(change);