You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/01/02 19:49:00 UTC

ignite git commit: IGNITE-2330: Minor fix.

Repository: ignite
Updated Branches:
  refs/heads/ignite-2330 a8ab3bb32 -> b4a32bea7


IGNITE-2330: Minor fix.


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

Branch: refs/heads/ignite-2330
Commit: b4a32bea7bf42117b5ece0eb5ee9af3bba70214e
Parents: a8ab3bb
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Sat Jan 2 21:49:32 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Sat Jan 2 21:49:32 2016 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/cluster/ClusterGroupAdapter.java | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b4a32bea/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
index 74e63a7..a153b83 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
@@ -368,8 +368,7 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable {
         guard();
 
         try {
-            if (p != null)
-                ctx.resource().injectGeneric(p);
+            ctx.resource().injectGeneric(p);
 
             return new ClusterGroupAdapter(ctx, subjId, this.p != null ? F.and(p, this.p) : p);
         }
@@ -704,6 +703,7 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable {
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
     @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
         gridName = U.readString(in);
         subjId = U.readUuid(in);
@@ -920,7 +920,7 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable {
 
                 ClusterNode node = isOldest ? U.oldest(super.nodes(), null) : U.youngest(super.nodes(), null);
 
-                IgnitePredicate<ClusterNode> p = new GridNodePredicate(Collections.singleton(node.id()));
+                IgnitePredicate<ClusterNode> p = new GridNodePredicate(node);
 
                 state = new AgeClusterGroupState(node, p, lastTopVer);
             }
@@ -962,8 +962,7 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable {
             guard();
 
             try {
-                if (p != null)
-                    ctx.resource().injectGeneric(p);
+                ctx.resource().injectGeneric(p);
 
                 return new ClusterGroupAdapter(ctx, this.subjId, new GroupPredicate(this, p));
             }