[QFJ-315] Field type EXCHANGE is mapped to type CHAR, whereas the ENUM should be of String type. Breaks generating source code. Created: 04/Jun/08 Updated: 07/Aug/08 Resolved: 17/Jun/08 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | Build |
Affects Version/s: | None |
Fix Version/s: | 1.3.2 |
Type: | Bug | Priority: | Major |
Reporter: | Emil Crumhorn | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Environment: |
Windows XP Pro |
Description |
In the Fields.xsl file used at code generation time, there are three field types mapped and a default as follows; <xsl:template name="values"> The missing entry for "EXCHANGE" should be: <xsl:when test="../@type='EXCHANGE'">public static final String <xsl:value-of select="@description"/> = "<xsl:value-of select="@enum"/>"; The default FIX44.xml file does not actually have any entries listed for "SecurityExchange" and thus this issue never crops up when genrating the QuickFix/J source on the normal FIX44.xml file (or other versions), however, if any entry is added under the fields as the following example; <field name="SourceExchange" number="6565" type="EXCHANGE"> the code generation will try to generate the type EXCHANGE to be a "char" enum, with field names that are longer than 1 char, or in the above case; "XQMH" etc. And as such the code will not compile. Full result: public class SecurityExchange extends StringField public static final int FIELD = 207; public SecurityExchange() { super(207); }public SecurityExchange(String data) { super(207, data); }} For more details on the ENUM values, here is a FIX reference document outlining all of it: http://www.onixs.biz/fixdictionary/4.4/app_6_c.html As a side note, It also seems that other custom field types that are defaulted to String.class in FieldType.java will fall into the "char" enum mapping as there is no "catch clause" for them in the xsl definition. Example: public final static FieldType Exchange = new FieldType("EXCHANGE"); among others. |