String Strangeness
mark wilkinson <inyabass-71ubn78lNmomlAP/[email protected]> Tue, 31 Jan 2012 12:38:39 +0000
| Newsgroups | gmane.comp.java.beanshell.user |
|---|---|
| Message-ID | <CAMQ-iu0F5RYD5fE7N0VvFR-NRqi4Dmkje7kcsO7vezJ6FVgMGQ@mail.gmail.com> |
Using bsh-2.0b5 embedded in JMeter-2.5.1
Trying to do a simple string assignment in a test script (test.bsh):
String rawBCString = "288/SetEntryList/7/ITSPUAT9/Home Page2/\9";
And get the following...
<snip>
bsh % source("test.bsh");
// Error: // Uncaught Exception: Method Invocation
this.interpreter.source : at Line: 14 : in file:
/bsh/commands/source.bsh : this .interpreter .source ( filename , this
.caller .namespace )
Called from method: source : at Line: 1 : in file: <unknown file> :
source ( "test.bsh" )
Target exception: Sourced file: test.bsh Token Parsing Error: Lexical
error at line 1, column 63. Encountered: "9" (57), after :
"\"288/SetEntryList/7/ITSPUAT9/Home Page2/\\": <at unknown location>
bsh %
<snip>
Anyone got any ideas what's going on here? I think it's something to
do with escape chars but having a "9" after a "\" doesn't seem like
anything odd to me. Looks like java is taking the raw string, escaping
all the "\" chars and then barfing on the result..
Cheers
MarkW
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d