Repository: incubator-ignite Updated Branches: refs/heads/ignite-1093 5e3d8008c -> 8341c6d76
ignite-1093 minor fix Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8341c6d7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8341c6d7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8341c6d7 Branch: refs/heads/ignite-1093 Commit: 8341c6d7662c3b56fb0c0228fc4df19a4e1ba64f Parents: 5e3d800 Author: Anton Vinogradov <avinogra...@gridgain.com> Authored: Fri Jul 31 18:50:19 2015 +0300 Committer: Anton Vinogradov <avinogra...@gridgain.com> Committed: Fri Jul 31 18:50:19 2015 +0300 ---------------------------------------------------------------------- .../dht/preloader/GridDhtPartitionDemandPool.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8341c6d7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java index 50c5e90..d9d871f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java @@ -572,14 +572,12 @@ public class GridDhtPartitionDemandPool { while (sent < maxC && it.hasNext()) { int p = it.next(); - Collection<Integer> ps = new ArrayList<>(1); + Collection<Integer> ps = Collections.singleton(p); boolean res = remaining.replace(p, false, true); assert res; - ps.add(p); - // Create copy. GridDhtPartitionDemandMessage initD = new GridDhtPartitionDemandMessage(d, ps); @@ -762,9 +760,7 @@ public class GridDhtPartitionDemandPool { try { for (Integer p : remaining.keySet()) { if (remaining.replace(p, false, true)) { - Collection<Integer> nextPs = new ArrayList<>(1); - - nextPs.add(p); + Collection<Integer> nextPs = Collections.singleton(p); // Create copy. GridDhtPartitionDemandMessage nextD = new GridDhtPartitionDemandMessage(d, nextPs);