summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-07-07 09:52:34 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-07-07 09:52:34 +0000
commit6c2d61829f0c908e0c7228589cf52c627d4cb7fe (patch)
tree2158610a325e5c03a06718d40737e34e205f94b3
parentb05cb129243d11d7640ad163c3b4ce418a922f8f (diff)
Avoid any empty tokens
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@961323 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java b/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
index c94a2f19fe..d55607444c 100644
--- a/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
+++ b/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
@@ -262,7 +262,14 @@ public class Shell {
l = ((BufferedReader)r).readLine();
history.add(l);
}
- return Arrays.asList(l != null? l.trim().split(" ") : "stop".split(" "));
+ String[] toks = l != null? l.trim().split(" ") : "stop".split(" ");
+ List<String> toksList = new ArrayList<String>();
+ for (String s : toks) {
+ if (s != null && s.trim().length()>0) {
+ toksList.add(s);
+ }
+ }
+ return toksList;
}
Callable<Boolean> eval(final List<String> toks) {