Revision: 2884
http://jnode.svn.sourceforge.net/jnode/?rev=2884&view=rev
Author: fduminy
Date: 2006-12-10 07:57:36 -0800 (Sun, 10 Dec 2006)
Log Message:
-----------
added more meaningfull message when escape char is not followed by a character
Modified Paths:
--------------
trunk/shell/src/shell/org/jnode/shell/CommandLine.java
Modified: trunk/shell/src/shell/org/jnode/shell/CommandLine.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/CommandLine.java 2006-12-09 18:47:57 UTC (rev 2883)
+++ trunk/shell/src/shell/org/jnode/shell/CommandLine.java 2006-12-10 15:57:36 UTC (rev 2884)
@@ -191,6 +191,11 @@
switch (currentChar) {
case ESCAPE_CHAR:
+ if(pos >= s.length())
+ {
+ throw new IllegalArgumentException("escape char ('\\') not followed by a character");
+ }
+
token.append(CommandLine.unescape(s.charAt(pos++)));
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|