[Quickfix-developers] SessionSettings improvement (I hope!)...
Brought to you by:
orenmnero
|
From: Tom D. <to...@di...> - 2005-12-06 15:29:18
|
Hi, folks...
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.
Tom...
} else if (ch == '=') {
ch = nextCharacter(inputStream); // wrong
skipWhitespace(inputStream);
if (isValueCharacter(ch)) {
/* original block of code, failed on file names
including spaces
sb.setLength(0);
do {
sb.append(ch);
ch = nextCharacter(inputStream);
} while (isValueCharacter(ch));
return new Token(VALUE_TOKEN, sb.toString());
*/
/* replacement block */
sb.setLength(0);
do {
sb.append(ch);
ch = nextCharacter(inputStream);
} while ("\r\n".indexOf(ch) == -1);
return new Token(VALUE_TOKEN, sb.toString().trim());
/* end replacement block */
}
|