<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:08:37 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-90] Simple type derivation relationship lost when binding DTO is translated to DOM and back.</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-90</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;Having model:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;typedef uri {
  type string;
}
typedef specialized-uri {
  type uri;
}

container data {
  leaf value {
    type uri;
  }
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Will result in following class hierarchy for typedefs:&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;
SpecializedUri &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Uri&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Container data will have builder with setValue(Uri value) method, which can accept also SpecializedUri,&lt;br/&gt;
 but when serializing / deserializing data - this information that originally SpecializedUri was used is lost and returned value is only of type Uri.&lt;/p&gt;</description>
                <environment></environment>
        <key id="26912">MDSAL-90</key>
            <summary>Simple type derivation relationship lost when binding DTO is translated to DOM and back.</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.opendaylight.org/images/icons/priorities/minor.svg">Low</priority>
                        <status id="10003" iconUrl="https://jira.opendaylight.org/images/icons/status_generic.gif" description="">Confirmed</status>
                    <statusCategory id="2" key="new" colorName="blue-gray"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="tony.tkacik@gmail.com">Tony Tkacik</reporter>
                        <labels>
                    </labels>
                <created>Wed, 10 Jun 2015 11:59:29 +0000</created>
                <updated>Mon, 24 Jul 2023 18:40:15 +0000</updated>
                                                                            <component>Binding codegen</component>
                    <component>Binding runtime</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="54141" author="rovarga" created="Fri, 16 Dec 2016 22:40:24 +0000"  >&lt;p&gt;This essentially means we have to maintain type information across serialization. I think we need a typical use case where this would apply, because this has non-trivial storage cost.&lt;/p&gt;

&lt;p&gt;In order to express the requirement at yang-data-api level, each leaf&apos;s value has to also include the TypeDefinition of the type, adding one layer of encapsulation:&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-comment&quot;&gt;// T being &lt;span class=&quot;code-quote&quot;&gt;&apos;&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;&apos;&lt;/span&gt; in &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;interface&lt;/span&gt; ValueNode&amp;lt;@Nonnull T&amp;gt; {

    TypeDefinition getType();

    T getValue();
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;leading to&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; &lt;span class=&quot;code-keyword&quot;&gt;interface&lt;/span&gt; LeafNode&amp;lt;V&amp;gt; {

    ValueNode&amp;lt;V&amp;gt; getValue();
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Note that XML/JSON would require annotations to preserve this information for all data, as we cannot assume that receiver is not observing ambiguities (such as a derived type we are not aware of).&lt;/p&gt;

&lt;p&gt;For leaf and leaf-lists this will incur additional 24-32 bytes per-instance cost until Java grows support for value types (dropping it to 8-12 bytes).&lt;/p&gt;

&lt;p&gt;If we decide to pay this cost (and perform the migration), we can also extend this to NormalizedNode, where that cost is only 4-8 bytes.&lt;/p&gt;</comment>
                            <comment id="67140" author="rovarga" created="Mon, 19 Aug 2019 15:42:45 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-440&quot; title=&quot;Reconsider TypeObject equals()/hashCode()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-440&quot;&gt;&lt;del&gt;MDSAL-440&lt;/del&gt;&lt;/a&gt; has delivered the most critical bit of functionality of this issue, as both of those returned objects will compare as equal.&lt;/p&gt;

&lt;p&gt;As the generated code getter will return Uri, user code wanting to forward the object towards a user which expects SpecializedUri can use an instanceof check and an explicit conversion.&lt;/p&gt;

&lt;p&gt;This issue can make that easier by exposing a utility static converter, which will integrate check/cast and conversion to SerializedUri &#8211; we already have an efficient constructor anyway.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="31619">MDSAL-440</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>3658</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=3658]]></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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02w93:</customfieldvalue>

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