ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [4/6] ignite git commit: Minors.
Date Tue, 09 Aug 2016 07:45:46 GMT
Minors.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5fb0a54d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5fb0a54d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5fb0a54d

Branch: refs/heads/ignite-2545
Commit: 5fb0a54d1ce498ec54d999046179029db1748682
Parents: 65d1b9d
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Tue Aug 9 10:39:50 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Tue Aug 9 10:39:50 2016 +0300

----------------------------------------------------------------------
 .../ignite/internal/util/future/GridCompoundFuture.java     | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5fb0a54d/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
index a78e5a8..941d88b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
@@ -208,6 +208,7 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R>
implements Ig
      *
      * @param fut Future to add.
      */
+    @SuppressWarnings("unchecked")
     public void add(IgniteInternalFuture<T> fut) {
         assert fut != null;
 
@@ -215,12 +216,12 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R>
implements Ig
             if (futs == null)
                 futs = fut;
             else if (futs instanceof IgniteInternalFuture) {
-                Collection<IgniteInternalFuture<T>> list = new ArrayList<>(2);
+                Collection<IgniteInternalFuture> futs0 = new ArrayList<>(4);
 
-                list.add((IgniteInternalFuture<T>)futs);
-                list.add(fut);
+                futs0.add((IgniteInternalFuture)futs);
+                futs0.add(fut);
 
-                futs = list;
+                futs = futs0;
             }
             else
                 ((Collection<IgniteInternalFuture>)futs).add(fut);


Mime
View raw message