<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:54:32 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-866] ClassLoaderUtils.withClassLoader is hard to use in Java 8 with Supplier as well as Callable signatures</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-866</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/68840/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/68840/&lt;/a&gt;&#160;pointed to&#160;&lt;br/&gt;
 &lt;tt&gt;yangtools.util.ClassLoaderUtils&lt;/tt&gt;&apos;s{{withClassLoader(...)}}, but this method is hard to use in practice with Java 8 lambdas (perhaps it was written before Java 8) because it has overloaded Supplier as well as Callable signatures, therefore e.g. something like 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;
ClassLoaderUtils.withClassLoader(KarafIniWebEnvironment.&lt;span class=&quot;code-keyword&quot;&gt;class.&lt;/span&gt;getClassLoader(), () -&amp;gt; {
 &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; factory.getInstance();
});
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;br/&gt;
 fails with:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;The method withClassLoader(ClassLoader, Supplier&amp;lt;SecurityManager&amp;gt;) is ambiguous for the type ClassLoaderUtils&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;this can be worked around with a cast like this of course, but this is cumbersome:&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;
ClassLoaderUtils.withClassLoader(
                KarafIniWebEnvironment.&lt;span class=&quot;code-keyword&quot;&gt;class.&lt;/span&gt;getClassLoader(), (Supplier&amp;lt;&lt;span class=&quot;code-object&quot;&gt;SecurityManager&lt;/span&gt;&amp;gt;) factory::getInstance);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="29439">YANGTOOLS-866</key>
            <summary>ClassLoaderUtils.withClassLoader is hard to use in Java 8 with Supplier as well as Callable signatures</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="vorburger">Michael Vorburger</reporter>
                        <labels>
                    </labels>
                <created>Fri, 16 Mar 2018 15:43:55 +0000</created>
                <updated>Mon, 19 Mar 2018 15:39:14 +0000</updated>
                            <resolved>Mon, 19 Mar 2018 15:39:14 +0000</resolved>
                                                    <fixVersion>2.0.3</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="61786" author="rovarga" created="Mon, 19 Mar 2018 09:39:33 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/69608&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/69608&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&#160;&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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03brr:</customfieldvalue>

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