<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:52: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>[YANGTOOLS-186] Odd use of number constructors in generated code</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-186</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;We&apos;re calling things like new Long(&quot;1&quot;) with a string constant.  Here we should use Long.valueOf(1L) rather than calling the constructor, and we shouldn&apos;t use a string we should use a constant.  At a minimum this should be Long.valueOf(&quot;1&quot;) if somehow we can&apos;t properly generate the constant value.&lt;/p&gt;

&lt;p&gt;Here&apos;s something that shows up in some generated code:&lt;/p&gt;

&lt;p&gt;    public static List&amp;lt;Range&amp;lt;Long&amp;gt;&amp;gt; length() &lt;/p&gt;
{
        final List&amp;lt;Range&amp;lt;Long&amp;gt;&amp;gt; result = new ArrayList&amp;lt;&amp;gt;();
        result.add(Range.closed(new Long(&quot;1&quot;), new Long(&quot;4096&quot;)));
        return result;
    }

&lt;p&gt;Here&apos;s another example:&lt;br/&gt;
           public RuleBuilder setOrder(Integer value) {&lt;br/&gt;
        if (value != null) {&lt;br/&gt;
            boolean isValidRange = false;&lt;br/&gt;
            List&amp;lt;Range&amp;lt;Integer&amp;gt;&amp;gt; rangeConstraints = new ArrayList&amp;lt;&amp;gt;(); &lt;br/&gt;
            rangeConstraints.add(Range.closed(new Integer(&quot;0&quot;), new Integer(&quot;2147483647&quot;)));&lt;br/&gt;
            for (Range&amp;lt;Integer&amp;gt; r : rangeConstraints) {&lt;br/&gt;
                if (r.contains(value)) &lt;/p&gt;
{
                isValidRange = true;
                }
&lt;p&gt;            }&lt;br/&gt;
            if (!isValidRange) &lt;/p&gt;
{
                throw new IllegalArgumentException(String.format(&quot;Invalid range: %s, expected: %s.&quot;, value, rangeConstraints));
            }
&lt;p&gt;        }&lt;/p&gt;

&lt;p&gt;        this._order = value;&lt;br/&gt;
        return this;&lt;br/&gt;
    }&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Linux&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="22606">YANGTOOLS-186</key>
            <summary>Odd use of number constructors in generated code</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="10002">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="readams">Rob Adams</reporter>
                        <labels>
                    </labels>
                <created>Thu, 12 Jun 2014 18:50:51 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:07 +0000</updated>
                            <resolved>Fri, 13 Jun 2014 07:00:41 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="42795" author="mvitez@cisco.com" created="Fri, 13 Jun 2014 07:00:41 +0000"  >&lt;p&gt;This looks like duplicate of &lt;a href=&quot;https://jira.opendaylight.org/browse/YANGTOOLS-177&quot; title=&quot;Optimize generated range checks&quot; class=&quot;issue-link&quot; data-issue-key=&quot;YANGTOOLS-177&quot;&gt;&lt;del&gt;YANGTOOLS-177&lt;/del&gt;&lt;/a&gt;. Patch was already proposed and currently is waiting for review.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="22597">YANGTOOLS-177</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>1194</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=1194]]></customfieldvalue>

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

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