<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:09:42 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-394] Generated DataObject interfaces should override DataObject.getImplementedClass()</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-394</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;We currently purely inherit this class, which is suboptimal when dealing with generics, most notably this case does not work:&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;interface&lt;/span&gt; Foo &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; DataObject;

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &amp;lt;T &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Foo&amp;gt; void doSomething(T foo) {
    &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt;&amp;lt;? &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; T&amp;gt; fooSubclass = foo.getImplementedInterface();
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;While all implementations are already returning the right answer (and if they don&apos;t Binding just breaks down), it is not expressed in the interface contract.&lt;/p&gt;

&lt;p&gt;This this by generating a default interface method:&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;interface&lt;/span&gt; Foo &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; DataObject {
    @Override
    &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt;&amp;lt;? &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Foo&amp;gt; getImplementedInterface() {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; Foo.class;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This already exists in Builder&apos;s implementation generator, albeit in the form:&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;
@Override
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt;&amp;lt;Foo&amp;gt; getImplementedInterface() {
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; Foo.class;
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="31067">MDSAL-394</key>
            <summary>Generated DataObject interfaces should override DataObject.getImplementedClass()</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</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="10002">Duplicate</resolution>
                                        <assignee username="rovarga">Robert Varga</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                    </labels>
                <created>Thu, 15 Nov 2018 22:04:09 +0000</created>
                <updated>Sun, 25 Nov 2018 19:13:27 +0000</updated>
                            <resolved>Sun, 25 Nov 2018 19:12:59 +0000</resolved>
                                                                    <component>Binding codegen</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="65740" author="rovarga" created="Sun, 25 Nov 2018 19:12:59 +0000"  >&lt;p&gt;Exposing getImplementedInterface() in binding-model-api is dangerous, hence we&apos;ll implement this in &lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-396&quot; title=&quot;Add DataObject.implementedInterface()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-396&quot;&gt;&lt;del&gt;MDSAL-396&lt;/del&gt;&lt;/a&gt; only.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="31069">MDSAL-396</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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03kpr:</customfieldvalue>

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