Repository: incubator-apex-core
Updated Branches:
  refs/heads/devel-3 f48074ae0 -> ccee82fd0


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/devel-3
Commit: 7d0a6442e4c343dcc161d4ea84f9b205956ca9e5
Parents: ecb19fa
Author: ishark <[email protected]>
Authored: Wed Oct 14 17:33:22 2015 -0700
Committer: ishark <[email protected]>
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);

Reply via email to