ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject incubator-ignite git commit: # Cleanup code.
Date Thu, 19 Mar 2015 14:45:05 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-45 a8505ff3d -> 852b03525


# Cleanup code.


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

Branch: refs/heads/ignite-45
Commit: 852b0352503e1087e17cdd752f0ceef34471ca9a
Parents: a8505ff
Author: sevdokimov <sevdokimov@gridgain.com>
Authored: Thu Mar 19 17:44:55 2015 +0300
Committer: sevdokimov <sevdokimov@gridgain.com>
Committed: Thu Mar 19 17:44:55 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/internal/util/lang/GridFunc.java | 2 +-
 .../apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java    | 9 ++-------
 2 files changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/852b0352/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
index 4cbb40c..a527d65 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
@@ -5779,7 +5779,7 @@ public class GridFunc {
     public static <T extends R, R> Collection<R> upcast(Collection<T> c)
{
         A.notNull(c, "c");
 
-        return viewReadOnly(c, IDENTITY);
+        return (Collection<R>)c;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/852b0352/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index 9dbdd66..fc0eb0f 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -642,17 +642,12 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
 
     /** {@inheritDoc} */
     @Override public Collection<ClusterNode> getRemoteNodes() {
-        return F.<TcpDiscoveryNode, ClusterNode>upcast(ring.visibleRemoteNodes());
+        return F.upcast(ring.visibleRemoteNodes());
     }
 
     /** {@inheritDoc} */
     @Override public Collection<Object> injectables() {
-        Collection<Object> res = new LinkedList<>();
-
-        if (ipFinder != null)
-            res.add(ipFinder);
-
-        return res;
+        return F.<Object>asList(ipFinder);
     }
 
     /** {@inheritDoc} */


Mime
View raw message