<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:08:47 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-160] enum used as a key does not work</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-160</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;In my YANG model, I&apos;m using an enum leaf as key. That passes POJO generation, but fails the Java compilation. For instance, if I use the following perfectly valid model, it fails mvn build (when I use Beryllium-SR1 yangtools).&lt;/p&gt;

&lt;p&gt;module model1 {&lt;br/&gt;
    namespace &quot;model1&quot;;&lt;br/&gt;
    prefix &quot;model1&quot;;&lt;br/&gt;
    revision 2016-04-21 { }&lt;/p&gt;

&lt;p&gt;    grouping A {&lt;br/&gt;
        leaf B {&lt;br/&gt;
            type enumeration {&lt;br/&gt;
                enum X {}&lt;br/&gt;
                enum Y {}&lt;br/&gt;
            }&lt;br/&gt;
        }&lt;br/&gt;
    }&lt;/p&gt;

&lt;p&gt;    container C {&lt;br/&gt;
        list D &lt;/p&gt;
{
            key &quot;B&quot;;
            uses A;
        }
&lt;p&gt;    }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;mvn compilation generates the following error.&lt;/p&gt;


&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;INFO&amp;#93;&lt;/span&gt; -------------------------------------------------------------&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;ERROR&amp;#93;&lt;/span&gt; COMPILATION ERROR :&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;INFO&amp;#93;&lt;/span&gt; -------------------------------------------------------------&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;ERROR&amp;#93;&lt;/span&gt; model/src/main/yang-gen-code/org/opendaylight/yang/gen/v1/model1/rev160421/c/DBuilder.java:&lt;span class=&quot;error&quot;&gt;&amp;#91;40,32&amp;#93;&lt;/span&gt; incompatible types: java.lang.Enum cannot be converted to org.opendaylight.yang.gen.v1.model1.rev160421.A.B&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;ERROR&amp;#93;&lt;/span&gt; model/src/main/yang-gen-code/org/opendaylight/yang/gen/v1/model1/rev160421/c/DBuilder.java:&lt;span class=&quot;error&quot;&gt;&amp;#91;150,36&amp;#93;&lt;/span&gt; incompatible types: java.lang.Enum cannot be converted to org.opendaylight.yang.gen.v1.model1.rev160421.A.B&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;INFO&amp;#93;&lt;/span&gt; 2 errors&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;INFO&amp;#93;&lt;/span&gt; -------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;When I look deeper into the code generated, I see that DKey generates with the field of type Enum instead of type B (which is what DBuilder.java is expecting). The only way to get pass this issue is to define the enumeration separately as a typedef. If I do that, things work fine.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26982">MDSAL-160</key>
            <summary>enum used as a key does not work</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="filip.gregor@pantheon.tech">Filip Gregor</assignee>
                                    <reporter username="srini.seetharaman@gmail.com">Srini Seetharaman</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Apr 2016 21:11:27 +0000</created>
                <updated>Fri, 9 Mar 2018 18:00:14 +0000</updated>
                            <resolved>Mon, 16 May 2016 16:25:55 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="54302" author="martin.ciglan" created="Mon, 25 Apr 2016 09:22:05 +0000"  >&lt;p&gt;moving to MD-SAL&lt;/p&gt;</comment>
                            <comment id="54303" author="filip.gregor@pantheon.tech" created="Tue, 26 Apr 2016 12:48:00 +0000"  >&lt;p&gt;proposed fix &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/38106/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/38106/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="54304" author="rovarga" created="Mon, 16 May 2016 16:25:55 +0000"  >&lt;p&gt;Be: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/38865/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/38865/&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>5788</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=5788]]></customfieldvalue>

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

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

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

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