<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:08:31 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-51] Binding Java API Generator -&gt; NPE during code generation from specific yang models (package name is null for UnionType)</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-51</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;ERROR&amp;#93;&lt;/span&gt; yang-to-sources: Unable to generate sources with org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl generator&lt;br/&gt;
java.lang.IllegalArgumentException: Type cannot have Package Name referenced as NULL!&lt;br/&gt;
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88)&lt;br/&gt;
	at org.opendaylight.yangtools.sal.java.api.generator.GeneratorUtil.putTypeIntoImports(GeneratorUtil.java:138)&lt;/p&gt;



&lt;p&gt;package name cannot be null, problem with hard-coded UnionType class:&lt;/p&gt;

&lt;p&gt;public static final class UnionType implements Type {&lt;br/&gt;
        @Override&lt;br/&gt;
        public String getPackageName() {&lt;br/&gt;
            return null;&lt;br/&gt;
.&lt;br/&gt;
.&lt;br/&gt;
.&lt;br/&gt;
.&lt;br/&gt;
.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26873">MDSAL-51</key>
            <summary>Binding Java API Generator -&gt; NPE during code generation from specific yang models (package name is null for UnionType)</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="martin.ciglan">Martin Ciglan</assignee>
                                    <reporter username="martin.ciglan">Martin Ciglan</reporter>
                        <labels>
                    </labels>
                <created>Wed, 5 Nov 2014 14:42:55 +0000</created>
                <updated>Fri, 9 Mar 2018 18:00:04 +0000</updated>
                            <resolved>Fri, 10 Mar 2017 12:07:14 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="54029" author="martin.ciglan" created="Fri, 23 Jan 2015 14:42:38 +0000"  >&lt;p&gt;just to add, based on analysis of this issue:&lt;/p&gt;

&lt;p&gt;error occurs when using imported typedef based on union type:&lt;/p&gt;

&lt;p&gt;module module1 {&lt;/p&gt;

&lt;p&gt;  import module2 &lt;/p&gt;
{
     prefix m2;
  }

&lt;p&gt;  container foo {&lt;br/&gt;
    leaf address {&lt;br/&gt;
      type m2:host {&lt;br/&gt;
      }&lt;br/&gt;
    }&lt;br/&gt;
  }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;module module2 {&lt;br/&gt;
   typedef host {&lt;br/&gt;
      type union &lt;/p&gt;
{
        type int8;
        type string;
      }
&lt;p&gt;   }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Error doesn&apos;t occur if:&lt;br/&gt;
1) imported typedef is not based on union type&lt;/p&gt;

&lt;p&gt;typedef host &lt;/p&gt;
{
        type string;
    }

&lt;p&gt;2) typedef host is inside of module1&lt;/p&gt;</comment>
                            <comment id="54030" author="vrpolak" created="Mon, 4 Jul 2016 10:53:46 +0000"  >&lt;p&gt;Currently developed openconfig models trigger this Bug.&lt;br/&gt;
(Several of the models, mostly related to BGP, RIB and MPLS.)&lt;br/&gt;
&lt;a href=&quot;https://github.com/openconfig/public&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/openconfig/public&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="54031" author="martin.ciglan" created="Fri, 10 Feb 2017 13:43:13 +0000"  >&lt;p&gt;being fixed as part of types resolution within Binding generator for v2&lt;/p&gt;</comment>
                            <comment id="54032" author="martin.ciglan" created="Wed, 8 Mar 2017 15:00:55 +0000"  >&lt;p&gt;fix pushed:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/53010/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/53010/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="26862">MDSAL-40</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="22821">YANGTOOLS-401</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>2323</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=2323]]></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="10348"><![CDATA[Carbon-M5]]></customfieldvalue>

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

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