<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:55:16 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-1127] Fix SchemaContextUtil.findDataSchemaNodeForRelativeXPath()</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-1127</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;On resolving relative paths for key_leaf1 and leaf2 leafrefs(with findDataSchemaNodeForRelativeXPath)&#160; SchemaContextUtil.resolveRelativePath() returns incorrect paths.&lt;/p&gt;

&lt;p&gt;module&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;
module a {
  yang-version 1;
  namespace &lt;span class=&quot;code-quote&quot;&gt;&quot;a&quot;&lt;/span&gt;;
  prefix &lt;span class=&quot;code-quote&quot;&gt;&quot;a&quot;&lt;/span&gt;;

  grouping foo_grp {
    leaf key_leaf1 {
      type leafref {
        path &lt;span class=&quot;code-quote&quot;&gt;&quot;../../../../../../a:foo_cont/a:name&quot;&lt;/span&gt;;
      }
    }
  }

  container bar_cont {
    leaf leaf2 {
       type leafref {
        path &lt;span class=&quot;code-quote&quot;&gt;&quot;../../../../../../a:foo_cont/a:name&quot;&lt;/span&gt;;
      }
    }
  }
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Incorrect paths: &lt;br/&gt;
 for key_leaf1: &lt;span class=&quot;error&quot;&gt;&amp;#91;(a)foo_grp, (a)key_leaf1, (a)foo_cont, (a)name&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;for leaf2: &lt;span class=&quot;error&quot;&gt;&amp;#91;(a)bar_cont, (a)leaf2, (a)foo_cont, (a)name&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;On call findDataSchemaNodeForRelativeXPath with leaf2 fails with&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;
java.lang.IllegalArgumentException: Path [(a)bar_cont, (a)leaf2, (a)foo_cont, (a)name] &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; beyond terminal child
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;On call findDataSchemaNodeForRelativeXPath with key_leaf1 returns null.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Let&apos;s check whether the path goes behind grouping root node or root node of a different type. With this improvement, we will not lookup knowingly incorrect paths.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="33115">YANGTOOLS-1127</key>
            <summary>Fix SchemaContextUtil.findDataSchemaNodeForRelativeXPath()</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.opendaylight.org/images/icons/priorities/critical.svg">High</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="10002">Duplicate</resolution>
                                        <assignee username="miro.kovac">Miroslav Kovac</assignee>
                                    <reporter username="ilyaigushev">Ilya Igushev</reporter>
                        <labels>
                    </labels>
                <created>Thu, 30 Jul 2020 11:48:02 +0000</created>
                <updated>Wed, 17 Mar 2021 18:13:16 +0000</updated>
                            <resolved>Tue, 16 Feb 2021 09:37:54 +0000</resolved>
                                                    <fixVersion>7.0.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="68763" author="JIRAUSER12933" created="Tue, 17 Nov 2020 22:49:20 +0000"  >&lt;p&gt;Gerrit change is a correctly working solution, but it is dirty. createWalkablePath, resolveRelativePath, findTargetNode should be refactored in order to get rid of such conditionals:&lt;br/&gt;
 if (... == null)&lt;/p&gt;

{ &#160; &#160; return null; }

&lt;p&gt;Possibly divide every method into two versions one for when the root node of a relativePath is a grouping and another one when not.&#160;&lt;/p&gt;</comment>
                            <comment id="68943" author="rovarga" created="Thu, 28 Jan 2021 12:06:21 +0000"  >&lt;p&gt;This entire method needs to go. Its input context is woefully inadequate to actually perform the task. Also the implementation parses strings &#8211; for an input which already have as structured input!&lt;/p&gt;

&lt;p&gt;So we actually need to add the following method to SchemaInferenceStack:&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;
void enterPath(PathExpression path);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This will need to operate on both absolute and relative path, but that distinction is very simple (absolute == rewind to root and perform relative).&lt;/p&gt;

&lt;p&gt;The implementation can follow PathExpression.getSteps()&#160; rather than getOriginalString() it currently takes.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="33791">YANGTOOLS-1229</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="33764">YANGTOOLS-1216</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_10002" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>YANGTOOLS-1066</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03u4v:</customfieldvalue>

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