<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:55:26 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>[CONTROLLER-1390] The config module API does not make it clear what exactly needs to be returned by createInstance</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-1390</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;The current API for createInstance is as follows,&lt;/p&gt;

&lt;p&gt;java.lang.AutoCloseable createInstance();&lt;/p&gt;

&lt;p&gt;The problem with this is that when a module provides services a developer may not return an appropriate implementation of the services it provides. The error can then only be detected at runtime.&lt;/p&gt;

&lt;p&gt;One suggestion from rovarga is to change the API as follows,&lt;/p&gt;

&lt;p&gt;&amp;lt;T extends InterfaceA &amp;amp; InterfaceB &amp;amp; AutoClosable&amp;gt; T createInstance();&lt;/p&gt;

&lt;p&gt;which forces the developer to return an appropriate implementation.&lt;/p&gt;

&lt;p&gt;This also clarifies how exactly a module is supposed to provide multiple services.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="25944">CONTROLLER-1390</key>
            <summary>The config module API does not make it clear what exactly needs to be returned by createInstance</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="10001">Won&apos;t Do</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="moraja@cisco.com">Moiz Raja</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 Jul 2015 17:20:14 +0000</created>
                <updated>Thu, 19 Oct 2017 21:26:43 +0000</updated>
                            <resolved>Wed, 5 Jul 2017 01:08:57 +0000</resolved>
                                    <version>Lithium</version>
                                                    <component>config</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="50897" author="moraja@cisco.com" created="Thu, 9 Jul 2015 18:02:10 +0000"  >&lt;p&gt;Another one of my confusion stems from the fact that createInstance on the module actually is supposed to return an implementation of a service. &lt;/p&gt;

&lt;p&gt;A simplification could be on the following lines.&lt;/p&gt;

&lt;p&gt;interface ModuleX extends AutoCloseable {&lt;br/&gt;
    FooService createFooService();&lt;br/&gt;
    BarService createBarService();&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;class XModule extends AbstractXModule {&lt;/p&gt;

&lt;p&gt;    @Override&lt;br/&gt;
    public ModuleX createInstance() &lt;/p&gt;
{
        return new ModuleXImpl();
    }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;(or)&lt;/p&gt;

&lt;p&gt;class ModuleXImpl implements ModuleX extends AbstractXModule {&lt;br/&gt;
	@Override&lt;br/&gt;
        public ModuleX createInstance()&lt;/p&gt;
{
            return this;
        }
&lt;p&gt;    &lt;/p&gt;

&lt;p&gt;        @Override&lt;br/&gt;
        public FooService createFooService()&lt;/p&gt;
{
           ...
        }&lt;br/&gt;
&lt;br/&gt;
        @Override&lt;br/&gt;
        public BarService createBarService(){           ...        }

&lt;p&gt;}&lt;/p&gt;</comment>
                            <comment id="50898" author="tpantelis" created="Wed, 5 Jul 2017 01:08:57 +0000"  >&lt;p&gt;The CSS is being deprecated so not worth addressing.&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>3975</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=3975]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10349"><![CDATA[Unspecified]]></customfieldvalue>

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

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