commit | aa2f2f6a35ca0064b8e6e5ded25aea7a097f2f4f | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@ak.jp.nec.com> | Mon Jul 25 14:26:11 2016 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Tue Jul 26 18:05:11 2016 +0000 |
tree | ff1dfa0191a0c9a298da45368387ad158b177902 | |
parent | 147e6f431d11b32f028283166e294d0380383e09 [diff] |
Workaround for compiler warnings Change-Id: Ie20112bb6d69422724bebef8deed680393c19c70
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DefaultDistributedWorkQueue.java b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DefaultDistributedWorkQueue.java index 549cfc6..2f604d3 100644 --- a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DefaultDistributedWorkQueue.java +++ b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DefaultDistributedWorkQueue.java
@@ -36,10 +36,14 @@ .collect(Collectors.toCollection(ArrayList::new))); } + private final Collection<Task<E>> decodeCollection(Collection<Task<byte[]>> tasks) { + return Collections2.transform(tasks, task -> task.map(serializer::decode)); + } + @Override public CompletableFuture<Collection<Task<E>>> take(int maxTasks) { return backingQueue.take(maxTasks) - .thenApply(tasks -> Collections2.transform(tasks, task -> task.<E>map(serializer::decode))); + .thenApply(this::decodeCollection); } @Override