RE: [Quickfix-developers] SessionSettings improvement (I hope!)...
Brought to you by:
orenmnero
|
From: Shepheard, T. (London) <Tob...@ml...> - 2005-12-06 15:44:59
|
You might find changing isValueCharacter to treat spaces as a valid
value a cleaner approach, though I'm not sure if this might cause other
problems. Given that the string is trimmed at the end though I think it
would be ok.
=20
A word of warning on using "\r\n" - this is system dependent. You should
use the system newline property instead.
-----Original Message-----
From: qui...@li...
[mailto:qui...@li...] On Behalf Of
Tom Dilatush
Sent: 06 December 2005 15:29
To: QuickFIX Developers
Subject: [Quickfix-developers] SessionSettings improvement (I
hope!)...
=09
=09
Hi, folks...
=09
I've just started using QuickFIX/J for a production project. I
had a bit of trouble getting it going, and it turned out that the
problem was a data dictionary setting with a file name that included
spaces (this is hosted on a Windows system). This is inconvenient,
nothing more, but I fixed the problem with the change shown below, to
the getToken() method of SessionSetting.Tokenizer. The original code is
in blue, the new in red.
=09
Tom...
=09
} else if (ch =3D=3D '=3D') {
ch =3D nextCharacter(inputStream); // wrong
skipWhitespace(inputStream);
if (isValueCharacter(ch)) {
=09
/* original block of code, failed on file
names including spaces
sb.setLength(0);
do {
sb.append(ch);
ch =3D nextCharacter(inputStream);
} while (isValueCharacter(ch));
return new Token(VALUE_TOKEN,
sb.toString());
*/
=09
/* replacement block */
sb.setLength(0);
do {
sb.append(ch);
ch =3D nextCharacter(inputStream);
} while ("\r\n".indexOf(ch) =3D=3D -1);
return new Token(VALUE_TOKEN,
sb.toString().trim());
/* end replacement block */
}
--------------------------------------------------------
If you are not an intended recipient of this e-mail, please notify the =
sender, delete it and do not read, act upon, print, disclose, copy, =
retain or redistribute it. Click here for important additional terms =
relating to this e-mail. http://www.ml.com/email_terms/
--------------------------------------------------------
|