<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:48:27 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>[YANGIDE-15] Sometimes get NPE in HelpCompositionUtils.getNodeHelp(ASTNode)</title>
                <link>https://jira.opendaylight.org/browse/YANGIDE-15</link>
                <project id="10187" key="YANGIDE">yangide</project>
                    <description>&lt;p&gt;I sometimes see the following stacktrace:&lt;/p&gt;

&lt;p&gt;Exception:java.lang.NullPointerException: null&lt;br/&gt;
	 at org.opendaylight.yangide.editor.editors.text.help.HelpCompositionUtils.getNodeHelp(HelpCompositionUtils.java:50)&lt;br/&gt;
	 at org.opendaylight.yangide.editor.editors.text.hover.YangTextHover.getHoverInfo(YangTextHover.java:71)&lt;br/&gt;
	 at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:168)&lt;/p&gt;

&lt;p&gt;Besides the error dialog, I don&apos;t see any consequences from it.&lt;/p&gt;

&lt;p&gt;Here&apos;s the &quot;getNodeHelp&quot; method:&lt;br/&gt;
------------&lt;br/&gt;
    public static String getNodeHelp(ASTNode node) {&lt;br/&gt;
        if (node.getDescription() != null &amp;amp;&amp;amp; node.getDescription().length() &amp;gt; 0) &lt;/p&gt;
{ // line 50.
            return getLocalInfo(node);
        }
&lt;p&gt;        String info = getIndexedInfo(node);&lt;br/&gt;
        if (info == null)&lt;br/&gt;
            info = getLanguageHelp(node);&lt;br/&gt;
        return info;&lt;br/&gt;
    }&lt;br/&gt;
-------------&lt;/p&gt;

&lt;p&gt;From the context of line 50, it appears that &quot;node&quot; is null.  I don&apos;t think I&apos;ve ever seen this happen when I had the debugger connected and a breakpoint enabled here.  I&apos;ve tried to connect up the debugger after I see this happen, but I&apos;ve never been able to repeat it when the debugger is connected.&lt;/p&gt;

&lt;p&gt;A simple fix could be to just return null if node is null.  It appears from inspecting the &quot;TextViewerHoverManager&quot; code that calls this indirectly, that it would deal smoothly with a null return value.&lt;/p&gt;

&lt;p&gt;However, it&apos;s not clear whether getting a null value here is an indication of something else going wrong.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="27234">YANGIDE-15</key>
            <summary>Sometimes get NPE in HelpCompositionUtils.getNodeHelp(ASTNode)</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="10000">Done</resolution>
                                        <assignee username="dhevendran.k@tcs.com">Dhevendran Kulandaivel</assignee>
                                    <reporter username="dkarr">David M. Karr</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 May 2016 19:39:47 +0000</created>
                <updated>Fri, 3 Jun 2016 03:46:18 +0000</updated>
                            <resolved>Fri, 3 Jun 2016 03:46:18 +0000</resolved>
                                    <version>unspecified</version>
                                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="54977" author="dhevendran.k@tcs.com" created="Thu, 2 Jun 2016 05:05:15 +0000"  >&lt;p&gt;Hi David M. Karr&lt;/p&gt;

&lt;p&gt;The fix is available in &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/39743/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/39743/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks &amp;amp; Regards,&lt;br/&gt;
Dhevendran K&lt;/p&gt;</comment>
                            <comment id="54978" author="davidmichaelkarr@gmail.com" created="Thu, 2 Jun 2016 05:10:57 +0000"  >&lt;p&gt;Were you able to figure out how to repeat this reliably?  I would have fixed this myself, but I wanted to understand why this was happening, or at least be able to repeat it.&lt;/p&gt;</comment>
                            <comment id="54979" author="dhevendran.k@tcs.com" created="Thu, 2 Jun 2016 05:20:47 +0000"  >&lt;p&gt;(In reply to David M. Karr from comment #2)&lt;br/&gt;
&amp;gt; Were you able to figure out how to repeat this reliably?  I would have fixed&lt;br/&gt;
&amp;gt; this myself, but I wanted to understand why this was happening, or at least&lt;br/&gt;
&amp;gt; be able to repeat it.&lt;/p&gt;

&lt;p&gt;Hi David M. Karr &lt;/p&gt;

&lt;p&gt;Thanks for your comment. &lt;br/&gt;
No, I do not have the procedure to repeat / test the same. But, as far as the implementation goes, the null check is missing. Hence, it has been corrected&lt;/p&gt;</comment>
                            <comment id="54980" author="davidmichaelkarr@gmail.com" created="Thu, 2 Jun 2016 22:08:47 +0000"  >&lt;p&gt;The change for this has been merged.  I suppose we can mark it resolved, but it&apos;s a little annoying to mark a bug resolved that I don&apos;t even know how to test for.&lt;/p&gt;</comment>
                            <comment id="54981" author="dhevendran.k@tcs.com" created="Fri, 3 Jun 2016 03:46:18 +0000"  >&lt;p&gt;Hi David M. Karr&lt;/p&gt;

&lt;p&gt;This can be marked it as resolved since we are pretty sure ( in the implementation angel) that the exception is due to lack of null check at line number 50 in old code (i.e. 52 in merged code) &lt;/p&gt;

&lt;p&gt;Let us see whether this occurs in any of the product testing since we do not have any definite reproducer &lt;/p&gt;

&lt;p&gt;Thanks &amp;amp; Regards,&lt;br/&gt;
Dhevendran K&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>5891</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=5891]]></customfieldvalue>

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

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