[QFJ-646] MiscFeeType field is handled incorrectly Created: 27/Oct/11  Updated: 17/Nov/11

Status: Open
Project: QuickFIX/J
Component/s: Engine, Metadata/Specs
Affects Version/s: 1.5.0, 1.5.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: John Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: QuickfixJ


 Description   

The "MiscFeeType" extends StringField and the constants into it are "String"s. The specification however (and the dictionary) indicates that this field is a "char".
One of our clients sends this as a "String" (value "12"), but we reject the message because it is more than one "char" long. If he sent it as a "char", we would not reject, but it would not match the constants in the Class file.

Workarround, either:

  • Change the dictionary to have this field be a "STRING" (used this one since our client sends it as a String).
  • Have the "MiscFeeType" class extends "CharField" and change the constants in the Class file, and embed it into your own code to replace the one from the library (haven't tested that though).


 Comments   
Comment by Laurent Danesi [ 15/Nov/11 ]

Hi John,

Which FIX version are you using?

In fact, in the spec, this field was ever a char and recently changed to String with FIX5.0.
So the FIX4X.xml dictionaries are declaring it as a CharField and FIX50.xml is specifying it as a StringField accordingly with the spec.

Now, of course, if you need to downgrade FIX5 feature code to a FIX4X session, you need a custom dictionary but it is not a bug, isnt it?
What do you think?

Regards,

Laurent

Comment by John [ 15/Nov/11 ]

Hi,
I'm using the 4.x version. The problem is not to have "String" or "char", I do not care.
The problem is that if we receive a client's message as a char (which is the standard), it would not match the constants in the java source file

Comment by Laurent Danesi [ 15/Nov/11 ]

Hi,

In fact, we generate fields for each dictionary but only once for a field (no override) and we generate FIX50 before FIX4X so MiscFeeType is a StringField.

But I understand that if a client sends a String and MiscFeeType is a CharField, QFJ will reject but the current code should work as the parser will set the char as a String.anyway and we can match constants with equals method or I'm missing something perhaps?

Can you provide me a simple test to well understand and fix it please?

Laurent

Comment by John [ 17/Nov/11 ]
  • If the user sends as a String, he will send "12" => error on our side because it is more than two characters.
  • If the user sends as a character (character \0x000C), then it will be OK, BUT it will not match the constants declared in the java file "12" (this is a guess, maybe your code changes character '\0x000C' in String "12").
Generated at Sat Nov 23 00:39:22 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.