[Swift-commit] r4612 - in trunk: libexec src/org/griphyn/vdl/karajan/lib
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Mon Jun 13 21:17:30 CDT 2011
Author: hategan
Date: 2011-06-13 21:17:30 -0500 (Mon, 13 Jun 2011)
New Revision: 4612
Modified:
trunk/libexec/vdl-int.k
trunk/src/org/griphyn/vdl/karajan/lib/UnwrapClosedList.java
Log:
fixed arguments when wrapper arguments are passed through files
Modified: trunk/libexec/vdl-int.k
===================================================================
--- trunk/libexec/vdl-int.k 2011-06-14 02:16:03 UTC (rev 4611)
+++ trunk/libexec/vdl-int.k 2011-06-14 02:17:30 UTC (rev 4612)
@@ -444,9 +444,7 @@
"-k ", kickstart, nl(),
"-cdmfile ", cdm:file(), nl(),
"-status ", statusMode, nl(),
- "-a ", each(unwrapClosedList(arguments)), nl())
- for(a, unwrapClosedList(arguments)
- sys:file:write(wrapfile, append = true, a, nl())
+ for(a, unwrapClosedList(arguments), "-a ", a, nl())
)
)
)
Modified: trunk/src/org/griphyn/vdl/karajan/lib/UnwrapClosedList.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/UnwrapClosedList.java 2011-06-14 02:16:03 UTC (rev 4611)
+++ trunk/src/org/griphyn/vdl/karajan/lib/UnwrapClosedList.java 2011-06-14 02:17:30 UTC (rev 4612)
@@ -3,17 +3,14 @@
*/
package org.griphyn.vdl.karajan.lib;
+import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.workflow.ExecutionException;
-import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable;
import org.griphyn.vdl.mapping.DSHandle;
-import org.griphyn.vdl.mapping.HandleOpenException;
-import org.griphyn.vdl.mapping.InvalidPathException;
-import org.griphyn.vdl.mapping.Path;
public class UnwrapClosedList extends VDLFunction {
public static final Logger logger = Logger.getLogger(UnwrapClosedList.class);
@@ -24,18 +21,14 @@
setArguments(UnwrapClosedList.class, new Arg[] { PA_LIST });
}
- /**
- * Takes a supplied variable and path, and returns the unique value at that
- * path. Path can contain wildcards, in which case an array is returned.
- */
public Object function(VariableStack stack) throws ExecutionException {
@SuppressWarnings("unchecked")
List<DSHandle> l = (List<DSHandle>) PA_LIST.getValue(stack);
- Object[] r = new Object[l.size()];
+ List<Object> r = new ArrayList<Object>(l.size());
- for (int i = 0; i < r.length; i++) {
- r[i] = l.get(i).getValue();
+ for (DSHandle h : l) {
+ r.add(h.getValue());
}
return r;
More information about the Swift-commit
mailing list