<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:10:45 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-728] Build error on generated code for Enumeration</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-728</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;I&apos;m getting this build error when trying to build some thirdparty YANG modules (sorry I&apos;m not sure if I can provide all of them because of IP issues):&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;
[ERROR] ~/src/restconf/test/target/generated-sources/BindingJavaFileGenerator/org/opendaylight/yang/gen/v1/urn/bbf/yang/bbf/vdsl/rev191021/LineSpectrumProfile.java:[338,29] cannot find symbol
  symbol:   method getValue()
  location: variable _bits of type org.opendaylight.yang.gen.v1.urn.bbf.yang.bbf.vdsl.rev191021.LineSpectrumProfile.PowerManagementMode.Bits
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;This fails with the following pom configuration:&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;
&amp;lt;plugin&amp;gt;
    &amp;lt;groupId&amp;gt;org.opendaylight.yangtools&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;yang-maven-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;7.0.14&amp;lt;/version&amp;gt;
    &amp;lt;dependencies&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.opendaylight.mdsal&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;mdsal-binding-java-api-generator&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;8.0.7&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;com.google.guava&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;guava&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;30.1.1-jre&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;But used to work in former plugin versions:&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;
&amp;lt;plugin&amp;gt;
    &amp;lt;groupId&amp;gt;org.opendaylight.yangtools&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;yang-maven-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;3.0.16&amp;lt;/version&amp;gt;
    &amp;lt;dependencies&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.opendaylight.mdsal&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;maven-sal-api-gen-plugin&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;2.0.17&amp;lt;/version&amp;gt;
            &amp;lt;type&amp;gt;jar&amp;lt;/type&amp;gt;
        &amp;lt;/dependency&amp;gt;
    &amp;lt;/dependencies&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I&apos;m attaching the pom I used, the offending generated file (which also includes the YANG file), and the mvn -X results for the previous and current versions (note that I used JDK11 for the recent versions and JDK8 for the former, and I also used 15.1.0 as the lighty parent pom)&lt;/p&gt;

&lt;p&gt;The error comes from this generated code:&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-object&quot;&gt;String&lt;/span&gt; stringValue() {
    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (_enumeration != &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; _enumeration.toString();
    }
    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (_profiles != &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; Arrays.toString(_profiles.getValue());
    }

    &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; IllegalStateException(&lt;span class=&quot;code-quote&quot;&gt;&quot;No value assinged&quot;&lt;/span&gt;);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;Where profiles is an enumeration too, but the method getValue() is not implemented ( I guess in that case toString() should be called too?)&lt;/p&gt;</description>
                <environment></environment>
        <key id="35302">MDSAL-728</key>
            <summary>Build error on generated code for Enumeration</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <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="10003">Cannot Reproduce</resolution>
                                        <assignee username="rovarga">Robert Varga</assignee>
                                    <reporter username="jmatias">Jorge Matias</reporter>
                        <labels>
                    </labels>
                <created>Mon, 28 Feb 2022 11:28:27 +0000</created>
                <updated>Thu, 3 Mar 2022 07:48:35 +0000</updated>
                            <resolved>Thu, 3 Mar 2022 07:48:35 +0000</resolved>
                                                                    <component>Binding codegen</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="70615" author="rovarga" created="Thu, 3 Mar 2022 07:48:35 +0000"  >&lt;p&gt;These are BBF models, freely available at &lt;a href=&quot;https://github.com/BroadbandForum/yang&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/BroadbandForum/yang&lt;/a&gt; . Using those, I have no trouble generating bindings with mdsal-8.0.11, as evidenced in attached project.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="17408" name="bbg.tar.gz" size="47857" author="rovarga" created="Thu, 3 Mar 2022 07:47:23 +0000"/>
                            <attachment id="17407" name="enumeration-error.zip" size="2606826" author="jmatias" created="Mon, 28 Feb 2022 14:09:50 +0000"/>
                    </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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i041of:</customfieldvalue>

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