Committed by
Gerrit Code Review
Workaround for compiler warnings
Change-Id: Ie20112bb6d69422724bebef8deed680393c19c70
Showing
1 changed file
with
5 additions
and
1 deletions
... | @@ -36,10 +36,14 @@ public class DefaultDistributedWorkQueue<E> implements WorkQueue<E> { | ... | @@ -36,10 +36,14 @@ public class DefaultDistributedWorkQueue<E> implements WorkQueue<E> { |
36 | .collect(Collectors.toCollection(ArrayList::new))); | 36 | .collect(Collectors.toCollection(ArrayList::new))); |
37 | } | 37 | } |
38 | 38 | ||
39 | + private final Collection<Task<E>> decodeCollection(Collection<Task<byte[]>> tasks) { | ||
40 | + return Collections2.transform(tasks, task -> task.map(serializer::decode)); | ||
41 | + } | ||
42 | + | ||
39 | @Override | 43 | @Override |
40 | public CompletableFuture<Collection<Task<E>>> take(int maxTasks) { | 44 | public CompletableFuture<Collection<Task<E>>> take(int maxTasks) { |
41 | return backingQueue.take(maxTasks) | 45 | return backingQueue.take(maxTasks) |
42 | - .thenApply(tasks -> Collections2.transform(tasks, task -> task.<E>map(serializer::decode))); | 46 | + .thenApply(this::decodeCollection); |
43 | } | 47 | } |
44 | 48 | ||
45 | @Override | 49 | @Override | ... | ... |
-
Please register or login to post a comment