apex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject incubator-apex-core git commit: SPOI-6505 #resolve Added check for presence of @OutputPortFieldAnnotation.
Date Sun, 18 Oct 2015 03:11:19 GMT
Repository: incubator-apex-core
Updated Branches:
  refs/heads/release-3.2 83724f6c3 -> dc40027c0


SPOI-6505 #resolve Added check for presence of @OutputPortFieldAnnotation.


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

Branch: refs/heads/release-3.2
Commit: dc40027c0b7c6f11393efaa25f361fe2ae27f372
Parents: 83724f6
Author: ishark <isha@datatorrent.com>
Authored: Wed Oct 14 17:33:22 2015 -0700
Committer: Thomas Weise <thomas@datatorrent.com>
Committed: Sat Oct 17 20:08:56 2015 -0700

----------------------------------------------------------------------
 .../com/datatorrent/stram/webapp/asm/CompactUtil.java | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/dc40027c/engine/src/main/java/com/datatorrent/stram/webapp/asm/CompactUtil.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/com/datatorrent/stram/webapp/asm/CompactUtil.java b/engine/src/main/java/com/datatorrent/stram/webapp/asm/CompactUtil.java
index b0611b3..0b55578 100644
--- a/engine/src/main/java/com/datatorrent/stram/webapp/asm/CompactUtil.java
+++ b/engine/src/main/java/com/datatorrent/stram/webapp/asm/CompactUtil.java
@@ -153,12 +153,16 @@ public class CompactUtil
         if (annotation.desc.contains("InputPortFieldAnnotation")
             || annotation.desc.contains("OutputPortFieldAnnotation")) {
           List<Object> annotationValues = annotation.values;
-          int index = 0;
-          while (index < annotationValues.size()) {
-            annotationMap.put((String) annotationValues.get(index++), annotationValues.get(index++));
+          if (annotationValues != null) {
+            int index = 0;
+            while (index <= annotationValues.size() - 2) {
+              String key = (String)annotationValues.get(index++);
+              Object value = annotationValues.get(index++);
+              annotationMap.put(key, value);
+            }
+            node.setAnnotations(annotationMap);
+            annotations.add(node);
           }
-          node.setAnnotations(annotationMap);
-          annotations.add(node);
         }
       }
       cfn.setVisibleAnnotations(annotations);


Mime
View raw message