<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:09:12 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-244] @SuppressWarnings(&quot;all&quot;) on all generated code</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-244</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;All bindings code generated should have @SuppressWarnings(&quot;all&quot;).&lt;/p&gt;

&lt;p&gt;This would make it much easier / viable to enable more stringent automated code quality checks e.g. in Eclipse without getting a lot of warnings on /target/generated-sources/mdsal-binding &amp;amp; Co.&lt;/p&gt;

&lt;p&gt;Today for example you get a lot of warnings like:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&quot;The method getModuleInfo() of type $YangModelBindingProvider should be tagged with @Override since it actually overrides a superinterface method&quot;; and others related to @Override, like:&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;
	&lt;ul&gt;
		&lt;li&gt;&quot;The method getKey() of type NodeStatus should be tagged with @Override since it actually overrides a superinterface method&quot;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;
	&lt;ul&gt;
		&lt;li&gt;&quot;The method build() of type NodeStatusBuilder should be tagged with @Override since it actually overrides a superinterface method&quot;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;
	&lt;ul&gt;
		&lt;li&gt;The method getImplementedInterface() of type NodeStatusBuilder.NodeStatusImpl should be tagged with @Override since it actually overrides a superinterface method&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;&quot;The parameter augmentation is hiding a field from type 
{Some}
&lt;p&gt;Builder&quot;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;&quot;The expression of type int is boxed into Integer&quot;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;&quot;The import org.opendaylight.yang.gen.v1.urn.opendaylight.daexim.rev160921.DataStore.Enumeration is never used&quot;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;The parameter augmentation is hiding a field from type NodeStatusBuilder&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;etc. etc.&lt;/p&gt;

&lt;p&gt;While it would be theoretically possible to fix up each of these one by one, this would likely be a fair amount of work, but with little benefit - none of those are &quot;bugs&quot; - the code generators knows what its known; hopefully, contrary to much of our hand written code.&lt;/p&gt;

&lt;p&gt;Adding @SuppressWarnings(&quot;all&quot;) on all generated code probably also doesn&apos;t hurt (i.e. can only help) with build performance, if tools like javac, Eclipse&apos; compiler and perhaps Find Bugs and Checkstyle honour and skip so annotated types in their analysis (I don&apos;t know if they do).&lt;/p&gt;

&lt;p&gt;An alternative approach to putting @SuppressWarnings everywhere, specific to Eclipse only (and thus inferior already), would have been to mark target/generated-sources/mdsal-binding &amp;amp; Co. as &quot;Ignore optional compile problems&quot; in menu Project &amp;gt; Properties &amp;gt; Java Build Path &amp;gt; Source.  I&apos;ve explored this, but found that it is difficult to get M2E to do this automatically.  (If you are brave enough to click around hundreds of projects yourself, then at least since &lt;a href=&quot;https://bugs.eclipse.org/bugs/show_bug.cgi?id=388541&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.eclipse.org/bugs/show_bug.cgi?id=388541&lt;/a&gt; M2E no longer resets them; but we should not have to manually fiddle with such options in the first place - this should &quot;just work&quot; out of the box.)&lt;/p&gt;

&lt;p&gt;I&apos;ll raise a Gerrit with a starting point proposal for this.  As I&apos;m not familiar with the finer points of the code generation in mdsal, I expect that initial proposed change will likely require some tuning by someone experienced in the mdsal team - my hope is that by kicking this off, someone will be motivated to help me finish it?&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="27066">MDSAL-244</key>
            <summary>@SuppressWarnings(&quot;all&quot;) on all generated code</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</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="vorburger">Michael Vorburger</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Apr 2017 12:58:12 +0000</created>
                <updated>Fri, 8 Jun 2018 09:59:32 +0000</updated>
                            <resolved>Fri, 8 Jun 2018 09:59:32 +0000</resolved>
                                                    <fixVersion>Fluorine</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="54638" author="vorburger" created="Thu, 13 Apr 2017 12:59:38 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/54965/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/54965/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="54639" author="vorburger" created="Tue, 18 Apr 2017 16:25:42 +0000"  >&lt;p&gt;&amp;gt; * &quot;The expression of type int is boxed into Integer&quot; &lt;/p&gt;

&lt;p&gt;forget about this, that warning should not have been enabled&lt;/p&gt;</comment>
                            <comment id="54640" author="martin.ciglan" created="Wed, 19 Apr 2017 11:45:21 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/54982/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/54982/&lt;/a&gt; - this one too&lt;/p&gt;</comment>
                            <comment id="54641" author="vorburger" created="Tue, 9 May 2017 17:44:22 +0000"  >&lt;p&gt;Re-assigning issue to Robert based on discussion in Kernel projects call today:&lt;/p&gt;

&lt;p&gt;Robert is de-facto -2&apos;ing &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/54965/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/54965/&lt;/a&gt;, because he prefers to instead fix all code generators to not have warnings.  Here&apos;s what&apos;s left as of today:&lt;/p&gt;

&lt;p&gt;This can be seen using &lt;a href=&quot;https://github.com/vorburger/opendaylight-eclipse-setup&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/vorburger/opendaylight-eclipse-setup&lt;/a&gt; e.g. on daexim/model/target-ide/generated-sources/mdsal-binding; but like wise in other projects too.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;The parameter augmentation is hiding a field from type CancelExportOutputBuilder; that&apos;s from the menu Window &amp;gt; Preferences &amp;gt; Java &amp;gt; Compiler &amp;gt; Errors/Warnings Name shadowing and conflicts set to level &quot;Warning&quot; for all 3 of:&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;a) Field declaration hides another field or variable&lt;br/&gt;
b) Local variable declaration hides another field or variable&lt;br/&gt;
c) Type parameter hides another type&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Javadoc: Description expected after this reference DataStore.java line 62; that&apos;s from the menu Window &amp;gt; Preferences &amp;gt; Java &amp;gt; Compiler &amp;gt; Javadoc: &lt;span class=&quot;error&quot;&gt;&amp;#91;X&amp;#93;&lt;/span&gt; Process Javadoc comments, Malformed Javadoc comments: Warning as configured by opendaylight-eclipse-setup&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;        /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@param valueArg&lt;/li&gt;
	&lt;li&gt;@return corresponding Enumeration item&lt;br/&gt;
         */&lt;br/&gt;
        public static Enumeration forValue(int valueArg) 
{
            return VALUE_MAP.get(valueArg);
        }&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;The import org.opendaylight.yang.gen.v1.urn.opendaylight.daexim.rev160921.DataStore.Enumeration is never used: DataStore.java /org.opendaylight.daexim.daexim-model/target-ide/generated-sources/mdsal-binding/org/opendaylight/yang/gen/v1/urn/opendaylight/daexim/rev160921 line 3&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;The method getKey() of type ExcludedModules should be tagged with @Override since it actually overrides a superinterface method: ExcludedModules.java org.opendaylight.daexim.daexim-model/target-ide/generated-sources/mdsal-binding/org/opendaylight/yang/gen/v1/urn/opendaylight/daexim/rev160921/exclusions&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="54642" author="rovarga" created="Tue, 9 May 2017 23:28:22 +0000"  >&lt;p&gt;So we are down to&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;getKey(), which is an API design mistake in v1, and therefore requires some special-casing in the templates around method generation (because it is metadata encoded as a user property)&lt;/li&gt;
	&lt;li&gt;unneeded import, which should boil down to using importedName()&lt;/li&gt;
	&lt;li&gt;shadowed variable name, which should be a simple matter of choosing a new name for the argument&lt;/li&gt;
	&lt;li&gt;and a missing argument description, which we should handle by not emitting it at all of the field does not a &apos;description&apos; in the model.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="54643" author="rovarga" created="Thu, 11 May 2017 08:18:57 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/56833&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/56833&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/56834&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/56834&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After which we are down to two issues:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;getKey() override&lt;/li&gt;
	&lt;li&gt;unused import, which actually is an import of an inner type, hence we need a bit of context to understand that we are in the same compilation unit.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="54644" author="rovarga" created="Thu, 11 May 2017 09:33:20 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/56840&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/56840&lt;/a&gt; fixes the import&lt;/p&gt;</comment>
                            <comment id="54645" author="vorburger" created="Tue, 16 May 2017 15:31:47 +0000"  >&lt;p&gt;&amp;gt; While it would be theoretically possible to fix up each of &lt;br/&gt;
&amp;gt; these one by one, this would likely be a fair amount of work&lt;/p&gt;

&lt;p&gt;I&apos;ve re-tested for this issue today, by running &quot;mvn -Pide clean generate-sources&quot; and seen the number of warnings on generated code e.g. in project genius drop drastically from ca. 2100 to now TBD.  Here are the ones left (in genius; it&apos;s possible of course other projects have more still), all fall into 2 cases:&lt;/p&gt;

&lt;p&gt;1. The method getKey() of type InterfaceMonitorEntry should be tagged with @Override since it actually overrides a superinterface method	InterfaceMonitorEntry.java in e.g. org.opendaylight.genius.alivenessmonitor-api/target-ide/generated-sources/mdsal-binding/org/opendaylight/yang/gen/v1/urn/opendaylight/genius/alivenessmonitor/rev160411/_interface/monitor/map, line 59 ... indeed getKey() is on org.opendaylight.yangtools.yang.binding.Identifiable, but there is no @Override.&lt;/p&gt;

&lt;p&gt;2. The field Mpls.QNAME is hiding a field from type InterfaceType	Mpls.java in org.opendaylight.genius.interfacemanager-api/target-ide/generated-sources/mdsal-binding/org/opendaylight/yang/gen/v1/urn/opendaylight/genius/interfacemanager/rev160406, line 21 ... this is the public static final QName QNAME on a type (e.g. org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.Mpls) which extends another (e.g. org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType)&lt;/p&gt;</comment>
                            <comment id="62592" author="rovarga" created="Tue, 24 Apr 2018 09:39:59 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-2&quot; title=&quot;Naming conflict appears when key of list is constructed from leaf with name key&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-2&quot;&gt;&lt;del&gt;MDSAL-2&lt;/del&gt;&lt;/a&gt; will take care of the first case, we cannot do anything about the second &#8211; we need a public class constant.&lt;/p&gt;</comment>
                            <comment id="63363" author="rovarga" created="Fri, 8 Jun 2018 09:59:32 +0000"  >&lt;p&gt;Warnings which have been identified are fixed.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="26824">MDSAL-2</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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>8226</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=8226]]></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="10359"><![CDATA[Carbon-RC2]]></customfieldvalue>

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

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