You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apex.apache.org by th...@apache.org on 2015/11/03 03:27:29 UTC

[28/50] [abbrv] incubator-apex-core git commit: SPOI-6505 #resolve Added check for presence of @OutputPortFieldAnnotation.

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/master
Commit: dc40027c0b7c6f11393efaa25f361fe2ae27f372
Parents: 83724f6
Author: ishark <is...@datatorrent.com>
Authored: Wed Oct 14 17:33:22 2015 -0700
Committer: Thomas Weise <th...@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);