falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rag...@apache.org
Subject incubator-falcon git commit: FALCON-940 Avoid NPE in getAllEntitiesOfOneType() for zero elements. Contributed by Ruslan Ostafiychuk
Date Wed, 10 Dec 2014 21:30:46 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master 4133c9633 -> b364820dd


FALCON-940 Avoid NPE in getAllEntitiesOfOneType() for zero elements. Contributed by Ruslan
Ostafiychuk


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

Branch: refs/heads/master
Commit: b364820dde20ff487492146afa1f10cd094dd26d
Parents: 4133c96
Author: Raghav Kumar Gautam <raghav@apache.org>
Authored: Wed Dec 10 13:29:50 2014 -0800
Committer: Raghav Kumar Gautam <raghav@apache.org>
Committed: Wed Dec 10 13:29:50 2014 -0800

----------------------------------------------------------------------
 falcon-regression/CHANGES.txt                                  | 3 +++
 .../org/apache/falcon/regression/core/util/CleanupUtil.java    | 6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b364820d/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index f7b9781..04781f8 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -36,6 +36,9 @@ Trunk (Unreleased)
    via Samarth Gupta)
 
   IMPROVEMENTS
+   FALCON-940 Avoid NPE in getAllEntitiesOfOneType() for zero elements
+   (Ruslan Ostafiychuk via Raghav Kumar Gautam)
+
    FALCON-908 Remove jars that are not needed (Paul Isaychuk via Raghav Kumar Gautam)
 
    FALCON-939 Fixing few typos and removing unused stuff (Paul Isaychuk via Ruslan Ostafiychuk)

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b364820d/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/CleanupUtil.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/CleanupUtil.java
b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/CleanupUtil.java
index ef58b36..e997fc8 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/CleanupUtil.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/CleanupUtil.java
@@ -68,8 +68,10 @@ public final class CleanupUtil {
         InterruptedException {
         final EntityList entityList = getEntitiesResultOfOneType(entityManagerHelper, user);
         List<String> clusters = new ArrayList<String>();
-        for (EntityList.EntityElement entity : entityList.getElements()) {
-            clusters.add(entity.name);
+        if (entityList.getElements() != null) {
+            for (EntityList.EntityElement entity : entityList.getElements()) {
+                clusters.add(entity.name);
+            }
         }
         return clusters;
     }


Mime
View raw message