Closed orbli closed 1 year ago
On the low level, every field on the FIX message is a String.
You can test the presence of a field by using isSetField(int)
. Does that answer your question?
does that mean I cannot (or not supposed to) parse a locally assembled message (with type safe way)?
If you know what kind of field it is (in your example char
): what about using getChar(int)
??
If you know what kind of field it is (in your example
char
): what about usinggetChar(int)
??
yes Message::getChar
does not work too
I'm confused. Please show the code that your are trying to execute with getChar()
oh i made a mistake, ::getChar
works.
The 2nd println is where I got exception, but guess 1st line suffices.
public static void main(String[] args) throws FieldNotFound {
quickfix.fix50sp2.ExecutionReport msg = new quickfix.fix50sp2.ExecutionReport();
msg.setChar(39, '1');
System.out.println(msg.getChar(39));
System.out.println(msg.getSide());
}
OK. Side is Tag 54, tag 39 is OrdStatus.
Describe the bug I cannot parse message locally for a pre-flight check.
For example,
((FieldMap) targetFieldMap).setChar((int) key, (char) value)
do not insert a character (but instead a StringField: https://github.com/quickfix-j/quickfixj/blob/f4920953377e630323cbc5bd91f5008747cf435c/quickfixj-core/src/main/java/quickfix/FieldMap.java#L170 )To Reproduce Above description should be very sufficient. To elaborate more, something like
Expected behavior It should be a char field, so I can parse the msg locally.
system information:
Additional context N/A