<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:08:30 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-44] Autoboxing support</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-44</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;In situations where we have a containing element which has as its child a single container, we should make it easy to autobox it.&lt;/p&gt;

&lt;p&gt;Example:&#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;
choice ch {
  &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; foo-&lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; {
    container foo {
      ...
    }

  }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;foo-case contains a single container, foo. We should add an interface to Foo AutoBoxAble&amp;lt;FooCase&amp;gt;, and provide it a 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;class &lt;/span&gt;Foo {
  ...

  &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; FooCase autoBox() {
   &lt;span class=&quot;code-comment&quot;&gt;// wraps Foo in FooCase and returns it
&lt;/span&gt;  }
}
&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The same can also be done for containers:&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;
container bar-container {
  container bar {
     ...
  }
}

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;Bar {
  &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; BarContainer autoBox();
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;and lists&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;
list baz-entry { container baz { ... } }

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;Baz { &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; BazEntry autoBox(); }&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Note, this would be done only in the case where there was &lt;b&gt;only&lt;/b&gt; where there is a single container child.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26866">MDSAL-44</key>
            <summary>Autoboxing support</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.opendaylight.org/images/icons/priorities/minor.svg">Low</priority>
                        <status id="10001" iconUrl="https://jira.opendaylight.org/" description="">In Review</status>
                    <statusCategory id="4" key="indeterminate" colorName="yellow"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="SamoSchneider">Samuel Schneider</assignee>
                                    <reporter username="hagbard">Ed Warnicke</reporter>
                        <labels>
                            <label>pt</label>
                    </labels>
                <created>Mon, 4 Aug 2014 12:55:14 +0000</created>
                <updated>Tue, 9 Jan 2024 17:21:07 +0000</updated>
                                                            <fixVersion>14.0.0</fixVersion>
                                    <component>Binding codegen</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="54005" author="rovarga" created="Mon, 4 Aug 2014 20:31:35 +0000"  >&lt;p&gt;I actually think this should not be implemented in the interfaces themselves, but rather should be a method in the associated builder, e.g.&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;
&lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;FooBuilder {
&#160;
  Foo build() {
     ...
  }
  FooCase buildBoxed() {
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; FooCaseBuilder().setFoo(build()).build();
  }

}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;That way it is not part of the specification of the object itself, but rather a real convenience function, just as the entire builders are.&lt;/p&gt;

&lt;p&gt;Also, this can be generalized to any class which&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;implements&lt;/span&gt; ChildOf&amp;lt;T&amp;gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;where !(T instanceof Identifiable) and T does not place any structural requirements (must/when) on existence/value of Foo &#8211; as that would trigger an assertion failure at runtime.&lt;/p&gt;</comment>
                            <comment id="54006" author="lborak@cisco.com" created="Wed, 13 Aug 2014 21:10:37 +0000"  >&lt;p&gt;proposed patch: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/9744/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/9744/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="68662" author="rovarga" created="Thu, 8 Oct 2020 20:41:22 +0000"  >&lt;p&gt;Okay, reformatted this thing and I think I am finally getting (again?) what is it what we want to do.&lt;/p&gt;

&lt;p&gt;So this is &apos;traverse upwards&apos; builder and product propagation, really. We are attempting to this::&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; FooCase buildCase(&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; bar) {
&#160; &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; FooBuilder()
    .setBar(bar)
    .buildCase();
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Now in fluent form, we do not want to go directly from FooBuilder to FooCase. What we really want to do is this:&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; FooCase buildCase(&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; bar) {
&#160; &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; FooBuilder()
    .setBar(bar)
    .startFooCaseBuilder()
    .build();
  }
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;FooBuilder is handing itself to a FooCaseBuilder, i.e. a purely implementation flow thing to become:&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;
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; FooCase buildCase(&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; bar) {
  &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; FooBuilder()
    .setBar(bar) 
    .startFooCaseBuilder()
    .build();
   }
}
&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;if we peel the .build() step, we have a self-similar pattern:&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; ChildOf&amp;lt;FooCase&amp;gt; { };

&lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;FooBuilder &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; Builder&amp;lt;Foo&amp;gt; {
  &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; FooCaseBuilder startFooCaseBuilder() {
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; FooCaseBuilder(&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.build);
  }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;i.e. we can fluently continue building the FooCase from that property or directly build it.&lt;/p&gt;</comment>
                            <comment id="68774" author="JIRAUSER13135" created="Mon, 23 Nov 2020 08:04:31 +0000"  >&lt;p&gt;New patch: &lt;a href=&quot;https://git.opendaylight.org/gerrit/c/mdsal/+/93856&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/c/mdsal/+/93856&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Based this one: &lt;a href=&quot;https://git.opendaylight.org/gerrit/c/yangtools/+/9744&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/c/yangtools/+/9744&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="27059">MDSAL-237</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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>1478</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=1478]]></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="10321"><![CDATA[Carbon]]></customfieldvalue>

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

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