ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [32/50] [abbrv] ignite git commit: IGNITE-2288: Changed F.first(Iterable) to use index-based lookup for Lists.
Date Mon, 04 Jan 2016 09:19:07 GMT
IGNITE-2288: Changed F.first(Iterable) to use index-based lookup for Lists.


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

Branch: refs/heads/ignite-2206
Commit: 4a1a80c273d0e62589314af1dcadbc5c438d616f
Parents: 03ad6aa
Author: Ilya Lantukh <ilantukh@gridgain.com>
Authored: Tue Dec 29 11:20:29 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Tue Dec 29 11:20:29 2015 +0300

----------------------------------------------------------------------
 .../main/java/org/apache/ignite/internal/util/lang/GridFunc.java  | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4a1a80c2/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 8eeca6b..0678657 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
@@ -2842,6 +2842,9 @@ public class GridFunc {
         if (c == null)
             return null;
 
+        if (c instanceof List)
+            return first((List<? extends T>)c);
+
         Iterator<? extends T> it = c.iterator();
 
         return it.hasNext() ? it.next() : null;


Mime
View raw message