From c00bcffb99483d3b8032d0b5c616fcf080a664c4 Mon Sep 17 00:00:00 2001 From: "Mark H. Wood" Date: Wed, 6 Feb 2013 15:06:59 -0500 Subject: [PATCH] Add missing license reference, handle blank lines --- .../org/dspace/app/launcher/CommandRunner.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/dspace-api/src/main/java/org/dspace/app/launcher/CommandRunner.java b/dspace-api/src/main/java/org/dspace/app/launcher/CommandRunner.java index 93198f7afd..259acf0fa0 100644 --- a/dspace-api/src/main/java/org/dspace/app/launcher/CommandRunner.java +++ b/dspace-api/src/main/java/org/dspace/app/launcher/CommandRunner.java @@ -1,3 +1,10 @@ +/** + * The contents of this file are subject to the license and copyright + * detailed in the LICENSE and NOTICE files at the root of the source + * tree and available online at + * + * http://www.dspace.org/license/ + */ package org.dspace.app.launcher; import java.io.FileNotFoundException; @@ -79,12 +86,15 @@ public class CommandRunner { if (StreamTokenizer.TT_EOL == tokenizer.ttype) { - status = ScriptLauncher.runOneCommand(tokens.toArray(new String[tokens.size()])); - if (status > 0) + if (tokens.size() > 0) { - break; + status = ScriptLauncher.runOneCommand(tokens.toArray(new String[tokens.size()])); + if (status > 0) + { + break; + } + tokens.clear(); } - tokens.clear(); } else {