ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [1/8] ignite git commit: IGNITE-2263: Removed F.copy() method.
Date Wed, 30 Dec 2015 09:52:20 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-2263 ef26b779f -> 59b15072d


IGNITE-2263: Removed F.copy() method.


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

Branch: refs/heads/ignite-2263
Commit: ec563803c43a9a642ebc48acf4bc825914533b1f
Parents: ef26b77
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Wed Dec 30 12:19:53 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Wed Dec 30 12:19:53 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/IgniteKernal.java    | 15 ++++---
 .../ignite/internal/util/lang/GridFunc.java     | 42 +-------------------
 2 files changed, 10 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ec563803/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 14b5816..6bff560 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -2269,16 +2269,19 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
         Collection<Object> objs = new ArrayList<>();
 
         if (!F.isEmpty(cfg.getLifecycleBeans()))
-            F.copy(objs, cfg.getLifecycleBeans());
+            Collections.addAll(objs, cfg.getLifecycleBeans());
 
         if (!F.isEmpty(cfg.getSegmentationResolvers()))
-            F.copy(objs, cfg.getSegmentationResolvers());
+            Collections.addAll(objs, cfg.getSegmentationResolvers());
 
-        if (cfg.getConnectorConfiguration() != null)
-            F.copy(objs, cfg.getConnectorConfiguration().getMessageInterceptor(),
-                cfg.getConnectorConfiguration().getSslContextFactory());
+        if (cfg.getConnectorConfiguration() != null) {
+            objs.add(cfg.getConnectorConfiguration().getMessageInterceptor());
+            objs.add(cfg.getConnectorConfiguration().getSslContextFactory());
+        }
 
-        F.copy(objs, cfg.getMarshaller(), cfg.getGridLogger(), cfg.getMBeanServer());
+        objs.add(cfg.getMarshaller());
+        objs.add(cfg.getGridLogger());
+        objs.add(cfg.getMBeanServer());
 
         return objs;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec563803/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 72a907b..dc393d7 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
@@ -1794,7 +1794,7 @@ public class GridFunc {
 
             @SuppressWarnings({"unchecked"})
             @Nullable @Override public V1 get(Object key) {
-                if (isAll((K)key, p)) {
+                if (isAll((K) key, p)) {
                     V v = m.get(key);
 
                     if (v != null)
@@ -2850,46 +2850,6 @@ public class GridFunc {
     }
 
     /**
-     * Adds (copies) to given collection all elements in <tt>'from'</tt> array.
-     *
-     * @param to Collection to copy to.
-     * @param from Array to copy from.
-     * @param <T> Type of the free variable for the predicate and type of the collection
elements.
-     * @return Collection to copy to.
-     */
-    public static <T> Collection<T> copy(Collection<T> to, T... from) {
-        A.notNull(to, "to", from, "from");
-
-        copy(to, asList(from));
-
-        return to;
-    }
-
-    /**
-     * Adds (copies) to given collection using provided predicates. Element is copied if
all
-     * predicates evaluate to {@code true}.
-     *
-     * @param to Collection to copy to.
-     * @param from Collection to copy from.
-     * @param p Optional set of predicates to use for filtration.
-     * @param <T> Type of the free variable for the predicate and type of the collection
elements.
-     * @return Collection to copy to.
-     */
-    public static <T> Collection<T> copy(Collection<T> to, Iterable<?
extends T> from,
-        @Nullable IgnitePredicate<? super T>... p) {
-        A.notNull(to, "to", from, "from");
-
-        if (!isAlwaysFalse(p)) {
-            for (T t : from) {
-                if (isAll(t, p))
-                    to.add(t);
-            }
-        }
-
-        return to;
-    }
-
-    /**
      * Transforms one collection to another using provided closure. New collection will be
created.
      *
      * @param c Initial collection to transform.


Mime
View raw message