beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject [1/2] beam git commit: BEAM-1568 neffective null check in IsmFormat#structuralValue
Date Mon, 20 Mar 2017 22:33:33 GMT
Repository: beam
Updated Branches:
  refs/heads/master 59aa0dab7 -> 9b48a2d78


BEAM-1568 neffective null check in IsmFormat#structuralValue


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

Branch: refs/heads/master
Commit: 656d1958f4b43d326542f0ae9c5f2650967e7de3
Parents: 59aa0da
Author: tedyu <yuzhihong@gmail.com>
Authored: Sat Mar 11 19:59:19 2017 -0800
Committer: Davor Bonaci <davor@google.com>
Committed: Mon Mar 20 15:33:22 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/beam/runners/dataflow/internal/IsmFormat.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/656d1958/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/internal/IsmFormat.java
----------------------------------------------------------------------
diff --git a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/internal/IsmFormat.java
b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/internal/IsmFormat.java
index 5b733c8..6daddc6 100644
--- a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/internal/IsmFormat.java
+++ b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/internal/IsmFormat.java
@@ -404,12 +404,13 @@ public class IsmFormat {
 
     @Override
     public Object structuralValue(IsmRecord<V> record) throws Exception {
+      checkNotNull(record);
       checkState(record.getKeyComponents().size() == keyComponentCoders.size(),
           "Expected the number of key component coders %s "
           + "to match the number of key components %s.",
           keyComponentCoders.size(), record.getKeyComponents());
 
-      if (record != null && consistentWithEquals()) {
+      if (consistentWithEquals()) {
         ArrayList<Object> keyComponentStructuralValues = new ArrayList<>();
         for (int i = 0; i < keyComponentCoders.size(); ++i) {
           keyComponentStructuralValues.add(


Mime
View raw message