ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [43/50] [abbrv] ignite git commit: IGNITE-6107 first(list) should behave the same way as first(iterable) in case of null argument.
Date Mon, 21 Aug 2017 08:40:52 GMT
IGNITE-6107 first(list) should behave the same way as first(iterable) in case of null argument.


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

Branch: refs/heads/ignite-5578
Commit: d779f06edbbf405c084b9c9a20e5907f37d1f309
Parents: 4acbe0e
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Fri Aug 18 18:40:01 2017 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Fri Aug 18 18:40:01 2017 +0700

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


http://git-wip-us.apache.org/repos/asf/ignite/blob/d779f06e/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 ed2351d..fbb47c4 100755
--- 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
@@ -1549,7 +1549,7 @@ public class GridFunc {
      * @return List' first element or {@code null} in case if list is empty.
      */
     public static <T> T first(List<? extends T> list) {
-        if (list.isEmpty())
+        if (list == null || list.isEmpty())
             return null;
 
         return list.get(0);


Mime
View raw message