<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:09:39 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-374] Keyed list entry builders&apos; copy constructor checks for null key</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-374</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;When we generate a Builder and its corresponding internal implementation we are performing the following check:&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;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (base.key() == &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.key = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; LstKey(
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; base.getKey()
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; );
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;._key = base.getKey();
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.key = base.key();
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;._key = key.getKey();
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.augmentation = ImmutableMap.copyOf(base.augmentation);

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Note that getKey() here refers to the leaf which is a part of the key. This is something we are reusing between builder and implementation, hence they look essentially the same.&lt;/p&gt;

&lt;p&gt;Ever since we correctly override key() from Identifiable, Eclipse is warning us that the invocation in Builder&apos;s copy constructor is superfluous: key() is required to return non-null, hence there is simply no point in checking for it being null and having that boiler plate present.&lt;/p&gt;

&lt;p&gt;key() method here is also special (a bit), as it should not be a straight-up getter, but it should instantiate the key lazily on-demand. That obviously means that key constituent fields need to be checked for nullness during implementation instantiation &#8211; note that IllegalStateException can be thrown from Builder.build().&lt;/p&gt;

&lt;p&gt;These two points should addressed separately, with the builder copy constructor piece being addressed first.&lt;/p&gt;</description>
                <environment></environment>
        <key id="30863">MDSAL-374</key>
            <summary>Keyed list entry builders&apos; copy constructor checks for null key</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="10000">Done</resolution>
                                        <assignee username="rovarga">Robert Varga</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                    </labels>
                <created>Wed, 10 Oct 2018 15:58:04 +0000</created>
                <updated>Fri, 12 Oct 2018 12:25:53 +0000</updated>
                            <resolved>Fri, 12 Oct 2018 12:25:53 +0000</resolved>
                                                    <fixVersion>3.0.1</fixVersion>
                                    <component>Binding codegen</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="65308" author="rovarga" created="Wed, 10 Oct 2018 16:34:04 +0000"  >&lt;p&gt;The second part of this issue is split off in &lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-375&quot; title=&quot;Do not store duplicate keyed list entry fields&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-375&quot;&gt;MDSAL-375&lt;/a&gt;. An additional improvement to builders lifecycle is tracked in &lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-376&quot; title=&quot;Keyed list entry builder should cross-reference keys and their constituents&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-376&quot;&gt;MDSAL-376&lt;/a&gt;. This issue should provide baseline refactoring of AbstractBuilderTemplate so that the two follow-ups work on independently.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="30864">MDSAL-375</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="30865">MDSAL-376</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|i03jhb:</customfieldvalue>

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