<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:08:31 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-49] Do not generate Builders for Union types</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-49</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;Our codegen requires users to manually instantiate the builder for union types, which parses a string. &lt;a href=&quot;http://tools.ietf.org/html/rfc6020#section-9.12&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;RFC6020&lt;/a&gt;, specifies the following:&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;   When a string representing a union data type is validated, the string
   is validated against each member type, in the order they are
   specified in the &quot;type&quot; statement, until a match is found.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This removes enough ambiguity, such that we can auto-generate a proper builder. Generate the builder (still in src/main, as we need to maintain compatibility).&lt;/p&gt;

&lt;p&gt;Unfortunately this is not enough to implement the desired functionality: a union member can be either an instance-identifier, an identityref or a leafref (to one of those two types). Reconstructing those two types, even if we solve the ugly String format part (which has to end up not conflicting with previous listed members), requires loading classes.&lt;/p&gt;

&lt;p&gt;This cannot be achieved in a general way when we are in a JPMS/OSGi environment when the code implementing this functionality resides in the module/bundle defining the union, as it simply does not have access to the totality of classes. The only way to make that work is to have a runtime component which integrates with the environment in a manner similar to binding-dom-codec &amp;#8211; e.g. it has proper access to BindingRuntimeContext and can make decisions on that level.&lt;/p&gt;

&lt;p&gt;So rather than attempting to fix this wart, let&apos;s remove the union builders altogether: they are not referenced from generated code at all and therefore are only utilities for code. Utilities are best hand-crafted for a particular use case without a straight-jacket and in the appropriate component, with proper visibility and implementation constraints.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26871">MDSAL-49</key>
            <summary>Do not generate Builders for Union types</summary>
                <type id="10101" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10318&amp;avatarType=issuetype">Task</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="rovarga">Robert Varga</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                    </labels>
                <created>Fri, 31 Oct 2014 16:52:26 +0000</created>
                <updated>Thu, 14 Apr 2022 18:56:41 +0000</updated>
                            <resolved>Thu, 14 Apr 2022 18:56:41 +0000</resolved>
                                                    <fixVersion>10.0.0</fixVersion>
                                    <component>Binding codegen</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="54020" author="minna.hu@ericsson.com" created="Tue, 17 Feb 2015 09:09:21 +0000"  >&lt;p&gt;Hi Robert,&lt;/p&gt;

&lt;p&gt;What&apos;s your plan of fixing this bug? Do you have a date scheduled? Thanks!&lt;/p&gt;</comment>
                            <comment id="54021" author="rovarga" created="Tue, 17 Feb 2015 15:33:18 +0000"  >&lt;p&gt;We don&apos;t currently have a timeline for this due to resource constraints. The latest when we can make this change is M4, which I don&apos;t think we can currently commit to.&lt;/p&gt;</comment>
                            <comment id="54022" author="minna.hu@ericsson.com" created="Wed, 18 Feb 2015 01:54:42 +0000"  >&lt;p&gt;Robert, thank you for your reply! What does M4 mean?&lt;/p&gt;

&lt;p&gt;Would you mind giving more info? I can try to modify the code and contribute it back to the community.&lt;/p&gt;

&lt;p&gt;There is other thing I would like to get your comments on, please let me know your opinions. In our company, we want to use the JAVA classes generated by yang-tools and then add our specific annotations as well as change some generated code. Right now, I modify the BindingGeneratorImpl, BuilderTemplate, ClassTemplate, etc., do you know any better way to separate our code modification? Then we can merge in community updates easily and decouple our code change. &lt;/p&gt;

&lt;p&gt;Looking forward to your reply, thank you!&lt;/p&gt;</comment>
                            <comment id="54023" author="rovarga" created="Thu, 5 Mar 2015 09:37:23 +0000"  >&lt;p&gt;M4 as in the milestone in Simultaneous Release plan, for yangtools that is March 19th.&lt;/p&gt;

&lt;p&gt;As for modifications, that largely depends on the scope of changes. Can you elaborate a bit more?&lt;/p&gt;</comment>
                            <comment id="54024" author="minna.hu@ericsson.com" created="Fri, 6 Mar 2015 13:51:19 +0000"  >&lt;p&gt;You know that, for a yang container element, ODL generates an interface, a Builder class, and a private class inside the Builder class that implements the interface, right?&lt;/p&gt;

&lt;p&gt;The changes I made belong to following scope:&lt;br/&gt;
(1) Change the private implementation class to public;&lt;br/&gt;
(2) Add annotations on top of the implementation class and its class variables&lt;/p&gt;

&lt;p&gt;Do you recommend any way so that I can make the code change flexible? Thank you, looking forward to your reply!&lt;/p&gt;</comment>
                            <comment id="54025" author="rovarga" created="Wed, 18 Mar 2015 12:39:36 +0000"  >&lt;p&gt;Cannot make the API freeze deadline for Lithium, retarget to Beryllium.&lt;/p&gt;</comment>
                            <comment id="54026" author="rovarga" created="Mon, 17 Oct 2016 09:01:45 +0000"  >&lt;p&gt;Codecs are fixed, generated code needs take this into account (rather than requiring a custom-coded builder class).&lt;/p&gt;</comment>
                            <comment id="54027" author="martin.ciglan" created="Tue, 4 Apr 2017 10:48:24 +0000"  >&lt;p&gt;blocking 7942, so untargeting for time being&lt;/p&gt;</comment>
                            <comment id="70716" author="rovarga" created="Fri, 8 Apr 2022 19:33:53 +0000"  >&lt;p&gt;Changing the mapping identity mapping will require revisiting all the custom-coded builders. Let&apos;s remove them instead.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="27059">MDSAL-237</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="35337">MDSAL-733</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="26969">MDSAL-147</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="22830">YANGTOOLS-410</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10300">
                    <name>Issue split</name>
                                            <outwardlinks description="split to">
                                        <issuelink>
            <issuekey id="35431">MDSAL-741</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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>2289</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=2289]]></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_10202" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Priority</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10301"><![CDATA[Normal]]></customfieldvalue>

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

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