[Swift-commit] r5841 - trunk/src/org/griphyn/vdl/karajan/lib

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Mon Jul 16 23:47:33 CDT 2012


Author: hategan
Date: 2012-07-16 23:47:33 -0500 (Mon, 16 Jul 2012)
New Revision: 5841

Modified:
   trunk/src/org/griphyn/vdl/karajan/lib/UnitStart.java
Log:
don't record outputs for things that don't have an output

Modified: trunk/src/org/griphyn/vdl/karajan/lib/UnitStart.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/UnitStart.java	2012-07-17 04:46:25 UTC (rev 5840)
+++ trunk/src/org/griphyn/vdl/karajan/lib/UnitStart.java	2012-07-17 04:47:33 UTC (rev 5841)
@@ -9,6 +9,7 @@
  */
 package org.griphyn.vdl.karajan.lib;
 
+import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
 
@@ -57,24 +58,28 @@
             trackOutputs(stack, outputs, "SCOPE".equals(type));
         }
     }
+    
+    private static final List<DSHandle> EMPTY_OUTPUTS = Collections.emptyList();
 
     private void trackOutputs(VariableStack stack, String outputs, boolean deep) {
-        String[] names = outputs.split(",");
-        List<DSHandle> l = new LinkedList<DSHandle>();
-        for (String name : names) {
-        	if (deep) {
-        	    try {
-                    l.add((DSHandle) stack.getVar(name.toLowerCase()));
-                }
-                catch (VariableNotFoundException e) {
-                    logger.info("Could not find variable " + name, e);
-                }
-        	}
-        	else {
-        		l.add((DSHandle) stack.parentFrame().getVar(name));
-        	}
-        }
-        WaitingThreadsMonitor.addOutput(stack, l);
+    	if (outputs.length() != 0) {
+            String[] names = outputs.split(",");
+            List<DSHandle> l = new LinkedList<DSHandle>();
+            for (String name : names) {
+            	if (deep) {
+            	    try {
+                        l.add((DSHandle) stack.getVar(name.toLowerCase()));
+                    }
+                    catch (VariableNotFoundException e) {
+                        logger.info("Could not find variable " + name, e);
+                    }
+            	}
+            	else {
+            		l.add((DSHandle) stack.parentFrame().getVar(name));
+            	}
+            }
+            WaitingThreadsMonitor.addOutput(stack, l);
+    	}
     }
 
     protected static void log(boolean start, String type, ThreadingContext thread, String name, String line) {




More information about the Swift-commit mailing list