<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:08:48 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-161] Leaf of union type in grouping does not work as key in list</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-161</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;If you use a leaf from grouping of type union as a key in list, binding generates key class without that leaf as part of key.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;grouping common-cars {
  leaf brand {
    type union {
      type uint64;
      type string;
    }

  }
  leaf engine { type string; }
  leaf gearbox { type string; }
}
container cars {
  list car {
    key &quot;brand&quot;;
    uses common-cars;
  }

}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;From this yang we get empty key binding class&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;CarKey
  &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; Identifier&amp;lt;Car&amp;gt; {
  &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; serialVersionUID = -7229666078144872030L;
  &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; CarKey() {
  }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Simple workaround is to not use grouping. You can also define your own type with the appropriate union type as the base type and use this new type as a type for leaf in grouping.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26983">MDSAL-161</key>
            <summary>Leaf of union type in grouping does not work as key in list</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</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="rovarga">Robert Varga</assignee>
                                    <reporter username="jmorvay@cisco.com">Jakub Morvay</reporter>
                        <labels>
                    </labels>
                <created>Mon, 2 May 2016 09:14:31 +0000</created>
                <updated>Wed, 5 May 2021 15:27:37 +0000</updated>
                            <resolved>Sun, 25 Feb 2018 22:24:30 +0000</resolved>
                                    <version>Oxygen</version>
                    <version>Nitrogen SR1</version>
                    <version>Carbon SR2</version>
                                    <fixVersion>Oxygen</fixVersion>
                    <fixVersion>Nitrogen SR2</fixVersion>
                    <fixVersion>Carbon SR4</fixVersion>
                                    <component>Binding codegen</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="54305" author="filip.gregor@pantheon.tech" created="Tue, 17 May 2016 11:10:17 +0000"  >&lt;p&gt;This will be fixed in binding spec v2. Union is generated as inner class from grouping and this causes duplicate getters. This will not occur in binding spec v2.&lt;/p&gt;</comment>
                            <comment id="60909" author="rovarga" created="Thu, 1 Feb 2018 17:42:06 +0000"  >&lt;p&gt;Filip&apos;s analysis is utterly incorrect. The problem is that the return type is not found when we are searching for the key definition, as that codepath is looking only into public type definitions, not inner types. The correct fix is to publish inner types into ModuleContext just as we do for inner enums and then look those definitions up.&lt;/p&gt;

&lt;p&gt;Oxygen: &lt;a href=&quot;https://git.opendaylight.org/gerrit/67826&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/67826&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="60932" author="rovarga" created="Mon, 5 Feb 2018 13:37:24 +0000"  >&lt;p&gt;Carbon: &lt;a href=&quot;https://git.opendaylight.org/gerrit/67918&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/67918&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nitrogen: &lt;a href=&quot;https://git.opendaylight.org/gerrit/67917&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/67917&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="27059">MDSAL-237</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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>5826</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=5826]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10305"><![CDATA[Improvement]]></customfieldvalue>

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

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

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