Details
- 
    Type:New Feature 
- 
    Status: Open
- 
    Priority: Default Default
- 
    Resolution: Unresolved
- 
    Affects Version/s: 1.2.1
- 
    Fix Version/s: Future Releases
- 
    Component/s: Message Generation
- 
    Labels:None
- 
    Environment:windows XP/java 1.5_06
Description
Suppose I have the following xml message definition
<message name="FirmPrice" msgtype="UN020" msgcat="app">
    <field name="Symbol" required="Y"/>
    <field name="Size" required="Y"/> 
    <group name="NoPriceEntries" required="Y">
        <component name="PriceComponent" required="Y"/>
    </group>
    <group name="NoLegEntries" required="N">
        <component name="LegComponent" required="N"/>
    </group>
</message>
...
<component name="LegComponent">
    <field name="Size" required="Y"/>
    <field name="Symbol" required="Y"/>
    <group name="NoPriceEntries" required="Y">
        <component name="PriceComponent" required="Y"/>
    </group>
</component>
The message generation creates a MessageFactory.java which has the following snippet of code in it:
if("UN020".equals(msgType)) {
    switch(correspondingFieldID) 
}
This cannot compile, obviously, as it has a duplicate case label. So, it seems like the usage of a field in both, the enclosing message and the nested component is not handled properly by the generated code.
Looks like this is due to "NoPriceEntries" appearing twice: once in the main body of the message, and once in the subcomponent "LegComponent".