Skip to content

Commit 5f22d97

Browse files
committed
Remove cast
1 parent 3eae708 commit 5f22d97

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rxjava-core/src/main/java/rx/internal/util/SubscriptionRandomList.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ public void clear() {
113113
}
114114

115115
public void forEach(Action1<T> action) {
116-
Object[] ss;
116+
T[] ss=null;
117117
synchronized (this) {
118118
if (unsubscribed || subscriptions == null) {
119119
return;
120120
}
121-
ss = subscriptions.toArray();
121+
ss = subscriptions.toArray(ss);
122122
}
123-
for (Object t : ss) {
124-
action.call((T) t);
123+
for (T t : ss) {
124+
action.call(t);
125125
}
126126
}
127127

0 commit comments

Comments
 (0)