beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [21/50] incubator-beam git commit: Fix NPE in SimpleDoFnRunner
Date Tue, 25 Oct 2016 16:28:39 GMT
Fix NPE in SimpleDoFnRunner


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

Branch: refs/heads/apex-runner
Commit: 0d500efe3b2d4248e2889dfcf36423aa473ee0a5
Parents: b235041
Author: Kenneth Knowles <klk@google.com>
Authored: Fri Oct 21 11:30:33 2016 -0700
Committer: Kenneth Knowles <klk@google.com>
Committed: Sun Oct 23 19:52:51 2016 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/beam/runners/core/SimpleDoFnRunner.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/0d500efe/runners/core-java/src/main/java/org/apache/beam/runners/core/SimpleDoFnRunner.java
----------------------------------------------------------------------
diff --git a/runners/core-java/src/main/java/org/apache/beam/runners/core/SimpleDoFnRunner.java
b/runners/core-java/src/main/java/org/apache/beam/runners/core/SimpleDoFnRunner.java
index 4eda376..0360bc2 100644
--- a/runners/core-java/src/main/java/org/apache/beam/runners/core/SimpleDoFnRunner.java
+++ b/runners/core-java/src/main/java/org/apache/beam/runners/core/SimpleDoFnRunner.java
@@ -19,6 +19,7 @@ package org.apache.beam.runners.core;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
+import com.google.common.collect.Iterables;
 import com.google.common.collect.Sets;
 import java.io.IOException;
 import java.util.Collection;
@@ -511,7 +512,7 @@ public class SimpleDoFnRunner<InputT, OutputT> implements DoFnRunner<InputT,
Out
 
     @Override
     public BoundedWindow window() {
-      return null;
+      return Iterables.getOnlyElement(windows);
     }
 
     @Override


Mime
View raw message