Skip to content

Commit

Permalink
Fix a forgotten cast in run command. Split definitions with | instead…
Browse files Browse the repository at this point in the history
… of , to make it more uniform. Not sure what I was thinking ;)
  • Loading branch information
aufdemrand committed Jul 9, 2013
1 parent 51cdb8e commit 9fd372b
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -121,7 +121,7 @@ public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {

// Get the 'id' if specified
String id = (scriptEntry.hasObject("id") ?
(String) scriptEntry.getObject("id") : ScriptQueue._getNextId());
((Element) scriptEntry.getObject("id")).asString() : ScriptQueue._getNextId());

// Build the queue
ScriptQueue queue;
Expand All @@ -138,11 +138,11 @@ public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
int x = 1;
dList definitions = (dList) scriptEntry.getObject("definitions");
String[] definition_names = null;
try { definition_names = script.getContainer().getString("definitions").split(","); }
try { definition_names = script.getContainer().getString("definitions").split("\\|"); }
catch (Exception e) { }
for (String definition : definitions) {
queue.context.put(definition_names != null && definition_names.length >= x ?
definition_names[x - 1] : String.valueOf(x), definition);
definition_names[x - 1].trim() : String.valueOf(x), definition);
x++;
}
}
Expand Down

0 comments on commit 9fd372b

Please sign in to comment.