<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:52:35 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>[YANGTOOLS-214] toString methods in generated classes should use getClass().getSimpleName()</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-214</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;I spent about an hour debugging an equality problem where DataObject had the same logical data, but the class types were different and thus equality was failing. Specifically, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Uri class in its toString method hard-codes the name &quot;Uri&quot;. This is fine, except the derived classes do not override the toString method, so when they print out they still print &quot;URI: ..&quot;.&lt;/p&gt;

&lt;p&gt;This becomes a problem because the equals() method of URI check class types. So when for example you are comparing two org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.output.action._case.OutputAction which were built with a URI and another built with a NodeConnector, you will get an equality failure( because URI != NodeConnectorId) and you get no indication via debug that anything is different.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;     InstanceIdentifier&amp;lt;NodeConnector&amp;gt; instanceId = InstanceIdentifierUtils.createNodeConnectorIdentifier(&quot;openflow:1&quot;, &quot;3&quot; );&lt;br/&gt;
        NodeConnectorRef destPort = new NodeConnectorRef( instanceId );&lt;br/&gt;
        NodeConnectorId destPortUri = destPort.getValue().firstKeyOf(NodeConnector.class, NodeConnectorKey.class).getId();&lt;/p&gt;

&lt;p&gt;        OutputAction build1 = new OutputActionBuilder() //&lt;br/&gt;
        .setOutputNodeConnector( new Uri( destPortUri ) ) //&lt;br/&gt;
        .build();&lt;/p&gt;

&lt;p&gt;        OutputAction build2 = new OutputActionBuilder() //&lt;br/&gt;
        .setOutputNodeConnector( destPortUri ) //&lt;br/&gt;
        .build();&lt;/p&gt;

&lt;p&gt;        assertFalse( build1.equals( build2 ) ); //this returns false&lt;br/&gt;
        assertFalse( build1.toString(), build2.toString() ); //this returns true!&lt;/p&gt;


&lt;p&gt;Suggested Solution:&lt;/p&gt;

&lt;p&gt;I understand the argument to have NodeConnectorId( &quot;1&quot; ) != Uri(&quot;1&quot;), but we need to be consistent in our toStrings then. The base class &quot;Uri&quot; should really use &quot;getClass().getSimpleName()&quot; - that way the toStrings would not be equal and we can quickly identify the discrepancy.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Mac OS&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="22634">YANGTOOLS-214</key>
            <summary>toString methods in generated classes should use getClass().getSimpleName()</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                                <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="10000">Done</resolution>
                                        <assignee username="lborak@cisco.com">Ladislav Borak</assignee>
                                    <reporter username="devin.avery@brocade.com">Devin Avery</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Jul 2014 15:44:23 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:10 +0000</updated>
                            <resolved>Wed, 13 Aug 2014 20:25:01 +0000</resolved>
                                                                        <due>Fri, 25 Jul 2014 00:00:00 +0000</due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="42859" author="lborak@cisco.com" created="Mon, 28 Jul 2014 07:03:50 +0000"  >&lt;p&gt;proposed patch: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/9364/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/9364/&lt;/a&gt;&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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1372</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=1372]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10370"><![CDATA[Helium]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i025uf:</customfieldvalue>

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