Skip to content

Commit 6e1a1f7

Browse files
committed
Make rxjava-core typesafe
Conflicts: rxjava-core/src/main/java/rx/Observable.java rxjava-core/src/main/java/rx/observables/BlockingObservable.java rxjava-core/src/main/java/rx/subjects/PublishSubject.java
1 parent df4121b commit 6e1a1f7

File tree

9 files changed

+57
-1519
lines changed

9 files changed

+57
-1519
lines changed

rxjava-contrib/rxjava-swing/src/main/java/rx/observables/SwingObservable.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616
package rx.observables;
1717

18-
import static rx.Observable.filter;
19-
2018
import java.awt.Component;
2119
import java.awt.Dimension;
2220
import java.awt.event.ActionEvent;

rxjava-contrib/rxjava-swing/src/main/java/rx/swing/sources/AbstractButtonSource.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public void testObservingActionEvents() {
6969
@SuppressWarnings("unchecked")
7070
Action1<ActionEvent> action = mock(Action1.class);
7171
@SuppressWarnings("unchecked")
72-
Action1<Exception> error = mock(Action1.class);
72+
Action1<Throwable> error = mock(Action1.class);
7373
Action0 complete = mock(Action0.class);
7474

7575
final ActionEvent event = new ActionEvent(this, 1, "command");
@@ -85,7 +85,7 @@ void testAction() {
8585
Subscription sub = fromActionOf(button).subscribe(action, error, complete);
8686

8787
verify(action, never()).call(Matchers.<ActionEvent>any());
88-
verify(error, never()).call(Matchers.<Exception>any());
88+
verify(error, never()).call(Matchers.<Throwable>any());
8989
verify(complete, never()).call();
9090

9191
button.testAction();
@@ -97,7 +97,7 @@ void testAction() {
9797
sub.unsubscribe();
9898
button.testAction();
9999
verify(action, times(2)).call(Matchers.<ActionEvent>any());
100-
verify(error, never()).call(Matchers.<Exception>any());
100+
verify(error, never()).call(Matchers.<Throwable>any());
101101
verify(complete, never()).call();
102102
}
103103
}

rxjava-contrib/rxjava-swing/src/main/java/rx/swing/sources/KeyEventSource.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ public void testObservingKeyEvents() {
113113
@SuppressWarnings("unchecked")
114114
Action1<KeyEvent> action = mock(Action1.class);
115115
@SuppressWarnings("unchecked")
116-
Action1<Exception> error = mock(Action1.class);
116+
Action1<Throwable> error = mock(Action1.class);
117117
Action0 complete = mock(Action0.class);
118118

119119
final KeyEvent event = mock(KeyEvent.class);
120120

121121
Subscription sub = fromKeyEventsOf(comp).subscribe(action, error, complete);
122122

123123
verify(action, never()).call(Matchers.<KeyEvent>any());
124-
verify(error, never()).call(Matchers.<Exception>any());
124+
verify(error, never()).call(Matchers.<Throwable>any());
125125
verify(complete, never()).call();
126126

127127
fireKeyEvent(event);
@@ -133,7 +133,7 @@ public void testObservingKeyEvents() {
133133
sub.unsubscribe();
134134
fireKeyEvent(event);
135135
verify(action, times(2)).call(Matchers.<KeyEvent>any());
136-
verify(error, never()).call(Matchers.<Exception>any());
136+
verify(error, never()).call(Matchers.<Throwable>any());
137137
verify(complete, never()).call();
138138
}
139139

@@ -142,19 +142,19 @@ public void testObservingPressedKeys() {
142142
@SuppressWarnings("unchecked")
143143
Action1<Set<Integer>> action = mock(Action1.class);
144144
@SuppressWarnings("unchecked")
145-
Action1<Exception> error = mock(Action1.class);
145+
Action1<Throwable> error = mock(Action1.class);
146146
Action0 complete = mock(Action0.class);
147147

148148
Subscription sub = currentlyPressedKeysOf(comp).subscribe(action, error, complete);
149149

150150
InOrder inOrder = inOrder(action);
151151
inOrder.verify(action, times(1)).call(Collections.<Integer>emptySet());
152-
verify(error, never()).call(Matchers.<Exception>any());
152+
verify(error, never()).call(Matchers.<Throwable>any());
153153
verify(complete, never()).call();
154154

155155
fireKeyEvent(keyEvent(1, KeyEvent.KEY_PRESSED));
156156
inOrder.verify(action, times(1)).call(new HashSet<Integer>(asList(1)));
157-
verify(error, never()).call(Matchers.<Exception>any());
157+
verify(error, never()).call(Matchers.<Throwable>any());
158158
verify(complete, never()).call();
159159

160160
fireKeyEvent(keyEvent(2, KeyEvent.KEY_PRESSED));
@@ -173,7 +173,7 @@ public void testObservingPressedKeys() {
173173

174174
fireKeyEvent(keyEvent(1, KeyEvent.KEY_PRESSED));
175175
inOrder.verify(action, never()).call(Matchers.<Set<Integer>>any());
176-
verify(error, never()).call(Matchers.<Exception>any());
176+
verify(error, never()).call(Matchers.<Throwable>any());
177177
verify(complete, never()).call();
178178
}
179179

0 commit comments

Comments
 (0)