[Swift-commit] r5968 - trunk/src/org/griphyn/vdl/engine
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Mon Oct 15 13:45:54 CDT 2012
Author: hategan
Date: 2012-10-15 13:45:53 -0500 (Mon, 15 Oct 2012)
New Revision: 5968
Modified:
trunk/src/org/griphyn/vdl/engine/Karajan.java
Log:
fixed parameter check when only one parameter is used
Modified: trunk/src/org/griphyn/vdl/engine/Karajan.java
===================================================================
--- trunk/src/org/griphyn/vdl/engine/Karajan.java 2012-10-15 03:46:49 UTC (rev 5967)
+++ trunk/src/org/griphyn/vdl/engine/Karajan.java 2012-10-15 18:45:53 UTC (rev 5968)
@@ -25,6 +25,7 @@
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
@@ -880,9 +881,15 @@
VAR_TYPES.add("extractstructureelement");
}
- private boolean allVariables(Object list) {
- @SuppressWarnings("unchecked")
- List<StringTemplate> l = (List<StringTemplate>) list;
+ @SuppressWarnings("unchecked")
+ private boolean allVariables(Object st) {
+ List<StringTemplate> l;
+ if (st instanceof List) {
+ l = (List<StringTemplate>) st;
+ }
+ else {
+ l = Collections.singletonList((StringTemplate) st);
+ }
for (StringTemplate pst : l) {
if (!pst.getName().equals("call_arg")) {
return false;
More information about the Swift-commit
mailing list