quickfixj
quickfixj copied to clipboard
Remove field duplication on insertion
trafficstars
All the inserted fields are duplicated : they are converted to StringField, then added to the treeMap. We can remove a lot of allocations by avoiding this behavior. Unless there is a specific reason for this purpose, it seems to works fine without this.
The setField(DoubleField field) method got a different implementation from the other because we do not want to allocate a Double instance if the field was built using a double. Hence no null field check are performed for this one.
Furthermore, the setGroupCount() method allocated the string "1" when there is only one group, this is not efficient.