|
1 | 1 | package io.getstream.client; |
2 | 2 |
|
3 | 3 | import com.google.common.collect.Iterables; |
4 | | -import com.google.common.collect.Streams; |
5 | 4 | import io.getstream.core.exceptions.StreamException; |
6 | 5 | import io.getstream.core.models.Activity; |
7 | 6 | import io.getstream.core.models.FeedID; |
|
11 | 10 | import io.getstream.core.options.Offset; |
12 | 11 | import io.getstream.core.options.RequestOption; |
13 | 12 | import io.getstream.core.utils.DefaultOptions; |
| 13 | +import io.getstream.core.utils.Streams; |
| 14 | +import java8.util.J8Arrays; |
| 15 | +import java8.util.concurrent.CompletableFuture; |
| 16 | +import java8.util.concurrent.CompletionException; |
14 | 17 |
|
15 | 18 | import java.io.IOException; |
16 | 19 | import java.lang.reflect.ParameterizedType; |
17 | | -import java.util.Arrays; |
18 | 20 | import java.util.List; |
19 | | -import java.util.concurrent.CompletableFuture; |
20 | | -import java.util.concurrent.CompletionException; |
21 | 21 |
|
22 | 22 | import static com.google.common.base.Preconditions.checkArgument; |
23 | 23 | import static com.google.common.base.Preconditions.checkNotNull; |
@@ -108,7 +108,7 @@ public final CompletableFuture<List<Activity>> addActivities(Activity... activit |
108 | 108 | } |
109 | 109 |
|
110 | 110 | public final <T> CompletableFuture<List<T>> addCustomActivities(T... activities) throws StreamException { |
111 | | - final Activity[] custom = Arrays.stream(activities) |
| 111 | + final Activity[] custom = J8Arrays.stream(activities) |
112 | 112 | .map(activity -> Activity.builder().fromCustomActivity(activity).build()) |
113 | 113 | .toArray(Activity[]::new); |
114 | 114 | return getClient() |
@@ -196,7 +196,7 @@ public final CompletableFuture<List<FollowRelation>> getFollowers(Limit limit, O |
196 | 196 | public final CompletableFuture<List<FollowRelation>> getFollowers(Limit limit, Offset offset, FeedID... feeds) throws StreamException { |
197 | 197 | checkNotNull(feeds, "No feed ids to filter on"); |
198 | 198 |
|
199 | | - final String[] feedIDs = Arrays.stream(feeds) |
| 199 | + final String[] feedIDs = J8Arrays.stream(feeds) |
200 | 200 | .map(id -> id.toString()) |
201 | 201 | .toArray(String[]::new); |
202 | 202 | final RequestOption[] options = feedIDs.length == 0 |
@@ -244,7 +244,7 @@ public final CompletableFuture<List<FollowRelation>> getFollowed(Limit limit, Of |
244 | 244 | public final CompletableFuture<List<FollowRelation>> getFollowed(Limit limit, Offset offset, FeedID... feeds) throws StreamException { |
245 | 245 | checkNotNull(feeds, "No feed ids to filter on"); |
246 | 246 |
|
247 | | - final String[] feedIDs = Arrays.stream(feeds) |
| 247 | + final String[] feedIDs = J8Arrays.stream(feeds) |
248 | 248 | .map(id -> id.toString()) |
249 | 249 | .toArray(String[]::new); |
250 | 250 | final RequestOption[] options = feedIDs.length == 0 |
|
0 commit comments