<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:09:28 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[MDSAL-305] Parameters sequence of generated constructor for bits type leaf should be same as the sequence of its bit fields defined in its yang file</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-305</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;Now the parameters sequence of generated constructor for bits type leaf  is the alphabetic sequence of names of its bit fields defined in its yang file. Such alphabetic sequence comes from the sort operation on all properties in ClassTemplate.xtend in v1 binding generator. &lt;/p&gt;

&lt;p&gt;This is not natual and if application developper doesn&apos;t carefully take a look at the generated constructor, they will construct such leaf node in the sequence of bit fields defined in the yang file. And such misuse won&apos;t be reported by the Java compiler. &lt;/p&gt;

&lt;p&gt;Can we eliminate the sort operation on all properties in ClassTemplate.xtend and let the parameters of all generated constructors appear in their natural order?&lt;/p&gt;</description>
                <environment></environment>
        <key id="29137">MDSAL-305</key>
            <summary>Parameters sequence of generated constructor for bits type leaf should be same as the sequence of its bit fields defined in its yang file</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10001">Won&apos;t Do</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="ykq">Kangqian Yin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 31 Jan 2018 02:29:23 +0000</created>
                <updated>Fri, 23 Feb 2018 14:14:15 +0000</updated>
                            <resolved>Fri, 23 Feb 2018 14:14:15 +0000</resolved>
                                                                    <component>Binding V2 codegen</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="60886" author="rovarga" created="Wed, 31 Jan 2018 02:46:31 +0000"  >&lt;p&gt;We cannot change this in Binding V1 without breaking existing users. Binding V2 is fair game. One question though: what is &apos;natural order&apos;? Is this the order of increasing values or the order in which bits are defined? I suspect the former, but that detail needs to be clearly defined.&lt;/p&gt;</comment>
                            <comment id="60887" author="ykq" created="Wed, 31 Jan 2018 03:24:00 +0000"  >&lt;p&gt;I don&apos;t think so. I think the order in which bits are defined is more natural than sorted order of alphabetic names or digital positions. &lt;/p&gt;

&lt;p&gt;The order in which bits are defined won&apos;t change when binding generator is replaced or user appends new bit  to the bits leaf.  And the sorted order of alphabetic names may change on these two cases.&lt;/p&gt;

&lt;p&gt;However, if user inserts new bit in the middle of defined bit fields, all construction codes must be rewritten due to the natural order changes.&lt;/p&gt;

&lt;p&gt;In Scala, we can use pass-by-name paramenters to write codes immune to all these changes. But in Java, it seems no pass-by-name parementers feature until Java 9. Maybe in Java 10, we can enjoy this feature.&lt;/p&gt;
</comment>
                            <comment id="61179" author="rovarga" created="Fri, 23 Feb 2018 14:14:04 +0000"  >&lt;p&gt;So we cannot do this in V2. If ever Scala bindings materialize they can implement this.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i039wn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>