<!-- 
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-52] Binding Java API Generator -&gt; doesn&apos;t handle non-alphabetic signs in names of enum constants, allowed by rfc6020 though</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-52</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;Binding Java API Generator doesn&apos;t handle non-alphabetic signs in names of enum constants, allowed by rfc6020 though.&lt;/p&gt;

&lt;p&gt;As an output of this issue, we&apos;re not able to compile generated code.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26874">MDSAL-52</key>
            <summary>Binding Java API Generator -&gt; doesn&apos;t handle non-alphabetic signs in names of enum constants, allowed by rfc6020 though</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="jakubtoth-0">Jakub Toth</assignee>
                                    <reporter username="martin.ciglan">Martin Ciglan</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 Nov 2014 12:42:49 +0000</created>
                <updated>Fri, 9 Mar 2018 18:00:04 +0000</updated>
                            <resolved>Wed, 26 Apr 2017 08:22:27 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="54033" author="martin.ciglan" created="Tue, 11 Nov 2014 09:43:46 +0000"  >&lt;p&gt;I am adding some kind of proposal how should we handle this issue. &lt;/p&gt;

&lt;p&gt;public class NonAlphabeticHandler {&lt;/p&gt;

&lt;p&gt;//give occurence enum constants meanings&lt;br/&gt;
private static final String ASTERISK_PATTERN = &quot;&lt;br class=&quot;atl-forced-newline&quot; /&gt;*&quot;;&lt;br/&gt;
private static final String ASTERISK_REPLACEMENT = &quot;_OccurenceZeroOrMultipleTimes&quot;;&lt;/p&gt;

&lt;p&gt;private static final String PLUS_PATTERN = &quot;&lt;br class=&quot;atl-forced-newline&quot; /&gt;+&quot;;&lt;br/&gt;
private static final String PLUS_REPLACEMENT = &quot;_OccurenceAtLeastOnce&quot;;&lt;/p&gt;

&lt;p&gt;private static final String ONE_PATTERN = &quot;1&quot;;&lt;br/&gt;
private static final String ONE_REPLACEMENT = &quot;_OccurenceExactlyOnce&quot;;&lt;/p&gt;

&lt;p&gt;private static final String QUESTIONMARK_PATTERN = &quot;&lt;br class=&quot;atl-forced-newline&quot; /&gt;?&quot;;&lt;br/&gt;
private static final String QUESTIONMARK_REPLACEMENT = &quot;_OccurenceZeroOrOneTime&quot;;&lt;/p&gt;

&lt;p&gt;//might get deleted and be part of generic one, detected it in name of protocol&lt;br/&gt;
private static final String COLON_PATTERN = &quot;:&quot;;&lt;br/&gt;
private static final String COLON_REPLACEMENT = &quot;_Colon&quot;;&lt;/p&gt;

&lt;p&gt;private static final String GENERIC_PATTERN = &quot;&lt;span class=&quot;error&quot;&gt;&amp;#91;^A-Za-z0-9&amp;#93;&lt;/span&gt;&quot;;&lt;br/&gt;
private static final String GENERIC_REPLACEMENT = &quot;_GenericNonAlpha&quot;;&lt;/p&gt;

&lt;p&gt;/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;This static method takes className as an input argument and looks for non-alphabetic signs in it.&lt;/li&gt;
	&lt;li&gt;It aims to replace them in order to get valid Java class names and be able to compile them.&lt;/li&gt;
	&lt;li&gt;Indicate by underscore sign (&apos;_&apos;) that replacement has been made up.&lt;/li&gt;
	&lt;li&gt;I propose to give meaning to replacements to mimic occurence enum constants names like &apos;*&apos;, &apos;?&apos;, &apos;+&apos;, etc...&lt;/li&gt;
	&lt;li&gt;Test implementation with various inputs to see coverage area and performance.&lt;/li&gt;
	&lt;li&gt;&lt;/li&gt;
	&lt;li&gt;@param className&lt;/li&gt;
	&lt;li&gt;@return className&lt;br/&gt;
     */&lt;br/&gt;
    public static String getValidClassName(String className) 
{
        String backup = className;
        
        className = className.replaceAll(ASTERISK_PATTERN, ASTERISK_REPLACEMENT);
        if (!className.equals(backup))
            return className;
        
        className = className.replaceAll(COLON_PATTERN, COLON_REPLACEMENT);
        if (!className.equals(backup))
            return className;

        className = className.replaceAll(PLUS_PATTERN, PLUS_REPLACEMENT);
        if (!className.equals(backup))
            return className;
        
        className = className.replaceAll(ONE_PATTERN, ONE_REPLACEMENT);
        if (!className.equals(backup))
            return className;
        
        className = className.replaceAll(QUESTIONMARK_PATTERN, QUESTIONMARK_REPLACEMENT);
        if (!className.equals(backup))
            return className;

        className = className.replaceAll(GENERIC_PATTERN, GENERIC_REPLACEMENT);
        if (!className.equals(backup))
            return className;

        return className;
    }&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;  public static void main(String[] args) {&lt;br/&gt;
        String className = &quot;+&quot;;&lt;/p&gt;

&lt;p&gt;        System.out.public class NonAlphabeticHandler {println(System.currentTimeMillis());&lt;br/&gt;
        System.out.println(className + &quot; -&amp;gt; &quot; + NonAlphabeticHandler.getValidClassName(className));&lt;br/&gt;
        System.out.println(System.currentTimeMillis() + &quot;\n&quot;);&lt;/p&gt;

&lt;p&gt;        className = &quot;Tdp:&quot;;&lt;/p&gt;

&lt;p&gt;        System.out.println(System.currentTimeMillis());&lt;br/&gt;
        System.out.println(className + &quot; -&amp;gt; &quot; + NonAlphabeticHandler.getValidClassName(className));&lt;br/&gt;
        System.out.println(System.currentTimeMillis() + &quot;\n&quot;)       &lt;br/&gt;
.&lt;/p&gt;

&lt;p&gt;.&lt;br/&gt;
.&lt;br/&gt;
.&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Note: Not sure about nonalphabetic signs, which are part of words like device names, perhaps Device+ -&amp;gt; Device_Plus would be more reasonable. Of course, it&apos;s matter of discussion in team.&lt;/p&gt;</comment>
                            <comment id="54034" author="martin.ciglan" created="Tue, 20 Jan 2015 11:03:40 +0000"  >&lt;p&gt;in very first draft phase&lt;/p&gt;</comment>
                            <comment id="54035" author="rgoulding" created="Wed, 6 Apr 2016 12:46:35 +0000"  >&lt;p&gt;Hi Martin,&lt;/p&gt;

&lt;p&gt;I see that you actively have &quot;taken&quot; this one... is that still applicable?  If not, please let me know so that I can take a look.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Ryan&lt;/p&gt;</comment>
                            <comment id="54036" author="martin.ciglan" created="Wed, 6 Apr 2016 13:44:05 +0000"  >&lt;p&gt;Hi Ryan&lt;/p&gt;

&lt;p&gt;This is one of several bugs, which we have identified during work with binding specification version 1. This issue depends on implementation of binding specification version 2, please see&lt;br/&gt;
&lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=1411&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=1411&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, once 1411 is resolved, this should get resolved too. I hope that helps.&lt;/p&gt;

&lt;p&gt;   Martin&lt;/p&gt;</comment>
                            <comment id="54037" author="vrpolak" created="Mon, 4 Jul 2016 13:41:12 +0000"  >&lt;p&gt;Java binding v2 will not be ported to Beryllium, as far as I know.&lt;/p&gt;

&lt;p&gt;In the meantime, it is possible to somewhat reduce severity of this Bug.&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/41280&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/41280&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="54038" author="vrpolak" created="Mon, 22 Aug 2016 12:26:34 +0000"  >&lt;p&gt;&amp;gt; it is possible to somewhat reduce severity&lt;/p&gt;

&lt;p&gt;Merged to master (Boron and Carbon): &lt;a href=&quot;https://git.opendaylight.org/gerrit/41280&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/41280&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Waiting for review for Beryllium: &lt;a href=&quot;https://git.opendaylight.org/gerrit/44481&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/44481&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="54039" author="vrpolak" created="Mon, 26 Sep 2016 16:58:19 +0000"  >&lt;p&gt;&amp;gt; Beryllium: &lt;a href=&quot;https://git.opendaylight.org/gerrit/44481&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/44481&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The workaround is now merged. Other characters aside slash have to be handled separately (possibly only in Java binding v2).&lt;/p&gt;</comment>
                            <comment id="54040" author="jatoth@cisco.com" created="Mon, 30 Jan 2017 12:34:36 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/51132/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/51132/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="26862">MDSAL-40</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="23019">YANGTOOLS-599</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_10207" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>External References</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>mdsal_bindingv1_txt_run_maven</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2332</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=2332]]></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="10348"><![CDATA[Carbon-M5]]></customfieldvalue>

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

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