<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:08:41 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-120] Duplicate length restriction checking</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-120</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;Migration to new types has introduce a regression in length enforcement, where the same length constraints are being enforced in Builders where the leaf is derived from a restricted type.&lt;/p&gt;

&lt;p&gt;This is evident in GBP&apos;s health.yang, where we see the following:&lt;/p&gt;

&lt;p&gt;    private static void check_descriptionLength(final String value) {&lt;br/&gt;
        final int length = value.length();&lt;br/&gt;
        if (length &amp;gt;= 1 &amp;amp;&amp;amp; length &amp;lt;= 4096) &lt;/p&gt;
{
            return;
        }&lt;br/&gt;
        throw new IllegalArgumentException(String.format(&quot;Invalid length: %s, expected: [&lt;span class=&quot;error&quot;&gt;&amp;#91;1&#8229;4096&amp;#93;&lt;/span&gt;].&quot;, value));&lt;br/&gt;
    }&lt;br/&gt;
&lt;br/&gt;
    public FaultBuilder setDescription(Description value) {&lt;br/&gt;
        if (value != null) {
            check_descriptionLength(value.getValue());
        }&lt;br/&gt;
        this._description = value;&lt;br/&gt;
        return this;&lt;br/&gt;
    }&lt;br/&gt;
&lt;br/&gt;
where Description already does:&lt;br/&gt;
&lt;br/&gt;
    private static void check_valueLength(final String value) {&lt;br/&gt;
        final int length = value.length();&lt;br/&gt;
        if (length &amp;gt;= 1 &amp;amp;&amp;amp; length &amp;lt;= 4096) {            return;        }
&lt;p&gt;        throw new IllegalArgumentException(String.format(&quot;Invalid length: %s, expected: [&lt;span class=&quot;error&quot;&gt;&amp;#91;1&#8229;4096&amp;#93;&lt;/span&gt;].&quot;, value));&lt;/p&gt;


&lt;p&gt;    @ConstructorProperties(&quot;value&quot;)&lt;br/&gt;
    public Description(java.lang.String _value) {&lt;br/&gt;
        if (_value != null) &lt;/p&gt;
{
            check_valueLength(_value);
            }


&lt;p&gt;        Preconditions.checkNotNull(_value, &quot;Supplied value may not be null&quot;);&lt;/p&gt;


&lt;p&gt;        this._value = _value;&lt;br/&gt;
    }&lt;/p&gt;

&lt;p&gt;While this does not affect functionality, it produces redundant code and reduces performance.&lt;/p&gt;

&lt;p&gt;This seems to be coming from BindingGeneratorUtil.getRestrictions(), which needs to check against the base type to see if the restrictions are different. If they are not, it should report empty restrictions.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26942">MDSAL-120</key>
            <summary>Duplicate length restriction checking</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="rovarga">Robert Varga</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                    </labels>
                <created>Tue, 8 Dec 2015 21:44:01 +0000</created>
                <updated>Fri, 9 Mar 2018 18:00:11 +0000</updated>
                            <resolved>Tue, 15 Dec 2015 12:32:06 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="54210" author="rovarga" created="Tue, 8 Dec 2015 22:19:03 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/31023&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/31023&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="54211" author="rovarga" created="Tue, 8 Dec 2015 23:47:58 +0000"  >&lt;p&gt;As it turns out, this is not a regression as current Lithium generates same duplicate enforcers.&lt;/p&gt;

&lt;p&gt;The patch below fixes only the class instantiation checks, where the enforcement hierarchy moves across the class hierarchy stack.&lt;/p&gt;

&lt;p&gt;Further investigation of BuilderTemplate.xtend needs to be done, leading to that template properly recognizing the case when the referenced type already performs the enforcement.&lt;/p&gt;</comment>
                            <comment id="54212" author="rovarga" created="Tue, 15 Dec 2015 12:32:06 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/31032&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/31032&lt;/a&gt;&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>4743</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=4743]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Bug]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10352"><![CDATA[Beryllium-RC0]]></customfieldvalue>

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

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