<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:56:19 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>[YANGTOOLS-1496] Add Runnable-backed Registration implementations</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-1496</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;Registration is a simple interface, which is quite easy to get wrong due to simple lamdas not being idempotent:&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;
Registration reg = () -&amp;gt; {
        &lt;span class=&quot;code-comment&quot;&gt;// not idempotent!
&lt;/span&gt;    };

reg.close() &lt;span class=&quot;code-comment&quot;&gt;// executes the block
&lt;/span&gt;reg.close() &lt;span class=&quot;code-comment&quot;&gt;// also executes the block!&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Current way of doing this is quite verbose:&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;var&lt;/span&gt; reg = AbstractRegistration() {
    @Override
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; void removeRegistration() {
        &lt;span class=&quot;code-comment&quot;&gt;// idempotent
&lt;/span&gt;    }
};

reg.close() &lt;span class=&quot;code-comment&quot;&gt;// executes the block
&lt;/span&gt;reg.close() &lt;span class=&quot;code-comment&quot;&gt;// does nothing&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Add Registration.of(Runnable) utility method which wraps a callback and executes it just once, backed by AbstractRegistration logic. This allows users to use lambdas (and method references) and wrap them with a guard:&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;var&lt;/span&gt; reg = Registration.of(() -&amp;gt; {
        &lt;span class=&quot;code-comment&quot;&gt;// idempotent
&lt;/span&gt;    });

reg.close() &lt;span class=&quot;code-comment&quot;&gt;// executes the block
&lt;/span&gt;reg.close() &lt;span class=&quot;code-comment&quot;&gt;// does nothing&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The same patterns applies to ObjectRegistration and ListenerRegistration.&lt;/p&gt;</description>
                <environment></environment>
        <key id="36817">YANGTOOLS-1496</key>
            <summary>Add Runnable-backed Registration implementations</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="10001" iconUrl="https://jira.opendaylight.org/" description="">In Review</status>
                    <statusCategory id="4" key="indeterminate" colorName="yellow"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="rovarga">Robert Varga</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                            <label>pt</label>
                    </labels>
                <created>Wed, 5 Apr 2023 11:08:35 +0000</created>
                <updated>Thu, 18 Jan 2024 10:42:39 +0000</updated>
                                                            <fixVersion>13.0.2</fixVersion>
                                    <component>common</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                        <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|i044q7:</customfieldvalue>

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