<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:09:04 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-214] Instance identifier can&apos;t be used in union</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-214</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;Following YANG is not compilable by yangtools:&lt;/p&gt;

&lt;p&gt;module demo {&lt;br/&gt;
    namespace &quot;urn:opendaylight:demo&quot;;&lt;br/&gt;
    prefix &quot;demo&quot;;&lt;br/&gt;
    revision &quot;2016-12-22&quot;;&lt;/p&gt;

&lt;p&gt;    typedef some-type {&lt;br/&gt;
    type union &lt;/p&gt;
{
      type instance-identifier;
      type string;
    }
&lt;p&gt;  } &lt;br/&gt;
}&lt;/p&gt;


&lt;p&gt;Yangtools generated source code requires union members to have method &quot;String getValue()&quot;, which is not case of built-in type InstanceIdentifier.&lt;br/&gt;
This results in compilation error:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;ERROR&amp;#93;&lt;/span&gt; Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project test-model: Compilation failure&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;ERROR&amp;#93;&lt;/span&gt; demo/target/generated-sources/mdsal-binding/org/opendaylight/yang/gen/v1/urn/opendaylight/demo/rev161222/SomeType.java:&lt;span class=&quot;error&quot;&gt;&amp;#91;63,45&amp;#93;&lt;/span&gt; cannot find symbol&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;ERROR&amp;#93;&lt;/span&gt; symbol:   method getValue()&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;ERROR&amp;#93;&lt;/span&gt; location: variable _instanceIdentifier of type org.opendaylight.yangtools.yang.binding.InstanceIdentifier&amp;lt;?&amp;gt;&lt;/p&gt;


&lt;p&gt;This is generated code (SomeType.java):&lt;/p&gt;

&lt;p&gt; 60     public char[] getValue() {&lt;br/&gt;
 61         if (_value == null) {&lt;br/&gt;
 62             if (_instanceIdentifier != null) &lt;/p&gt;
{
 63                 _value = _instanceIdentifier.getValue().toString().toCharArray();
 64             }
&lt;p&gt; else&lt;br/&gt;
 65             if (_string != null) &lt;/p&gt;
{
 66                 _value = _string.toCharArray();
 67             }
&lt;p&gt; 68         }&lt;br/&gt;
 69         return _value == null ? null : _value.clone();&lt;br/&gt;
 70     }&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="27036">MDSAL-214</key>
            <summary>Instance identifier can&apos;t be used in union</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="vrpolak">Vratko Polak</assignee>
                                    <reporter username="rkosegi@brocade.com">Richard Kosegi</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Dec 2016 05:59:42 +0000</created>
                <updated>Fri, 9 Mar 2018 18:00:18 +0000</updated>
                            <resolved>Thu, 12 Jan 2017 07:18:33 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="54542" author="pkajsa" created="Thu, 22 Dec 2016 09:26:02 +0000"  >&lt;p&gt;It is a binding generator issue, hence moved to md-sal.&lt;/p&gt;</comment>
                            <comment id="54543" author="vrpolak" created="Wed, 4 Jan 2017 13:39:52 +0000"  >&lt;p&gt;I lack the skill to make a proper unit test, and I am not sure the following is allowed from architecture point of view, but anyway:&lt;/p&gt;

&lt;p&gt;A failing change showing this Bug is real: &lt;a href=&quot;https://git.opendaylight.org/gerrit/50017&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/50017&lt;/a&gt;&lt;br/&gt;
A simple workaround: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/50019/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/50019/&lt;/a&gt;&lt;br/&gt;
Analogous change chowing the workaround works: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/50020/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/50020/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Verify jobs are still in queue. I hope I did not make any mistake when building locally.)&lt;/p&gt;</comment>
                            <comment id="54544" author="vrpolak" created="Wed, 4 Jan 2017 17:16:45 +0000"  >&lt;p&gt;&amp;gt; I hope I did not make any mistake&lt;/p&gt;

&lt;p&gt;Looks like no mistake, verification results are as expected.&lt;/p&gt;</comment>
                            <comment id="54545" author="vrpolak" created="Thu, 5 Jan 2017 16:24:27 +0000"  >&lt;p&gt;&amp;gt; A simple workaround&lt;/p&gt;

&lt;p&gt;... got -1.&lt;/p&gt;

&lt;p&gt;Better fix: &lt;a href=&quot;https://git.opendaylight.org/gerrit/50070&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/50070&lt;/a&gt;&lt;br/&gt;
Verification: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/50020/2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/50020/2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="54546" author="rovarga" created="Fri, 6 Jan 2017 14:40:04 +0000"  >&lt;p&gt;boron: &lt;a href=&quot;https://git.opendaylight.org/gerrit/50088&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/50088&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="54547" author="martin.ciglan" created="Thu, 12 Jan 2017 07:18:33 +0000"  >&lt;p&gt;fix for binding spec v2, carbon:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/50283/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/50283/&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>7425</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=7425]]></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="10344"><![CDATA[Boron-3]]></customfieldvalue>

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

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