You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apex.apache.org by vr...@apache.org on 2015/10/25 20:37:57 UTC

[14/36] incubator-apex-core git commit: Addressing review comments

Addressing review comments


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/7d0a6442
Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/tree/7d0a6442
Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/diff/7d0a6442

Branch: refs/heads/feature-module
Commit: 7d0a6442e4c343dcc161d4ea84f9b205956ca9e5
Parents: ecb19fa
Author: ishark <is...@datatorrent.com>
Authored: Wed Oct 14 17:33:22 2015 -0700
Committer: ishark <is...@datatorrent.com>
Committed: Fri Oct 16 18:06:00 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/7d0a6442/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);