<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:52:02 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-20] Generated code throws compiler errors</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-20</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;Seeing a problem with generated code in the affinity yang file. &lt;/p&gt;

&lt;p&gt;The compiler errors is: &lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;ERROR&amp;#93;&lt;/span&gt; /Users/sraman/affinity/affinity/yang/target/generated-sources/sal/org/opendaylight/yang/gen/v1/urn/opendaylight/affinity/rev130916/CreateAffinityGroupInputBuilder.java:&lt;span class=&quot;error&quot;&gt;&amp;#91;54,19&amp;#93;&lt;/span&gt; error: CreateAffinityGroupInputImpl is not abstract and does not override abstract method getAffinityIdentifier() in AffinityGroup&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;ERROR&amp;#93;&lt;/span&gt; /Users/sraman/affinity/affinity/yang/target/generated-sources/sal/org/opendaylight/yang/gen/v1/urn/opendaylight/affinity/rev130916/CreateAffinityGroupInputBuilder.java:&lt;span class=&quot;error&quot;&gt;&amp;#91;66,8&amp;#93;&lt;/span&gt; error: method does not override or implement a method from a supertype&lt;/p&gt;

&lt;p&gt;(1) The first error may be due to incorrect order of following blocks of code. &lt;/p&gt;


&lt;p&gt;(2) There seems to be an issue with the @Override directive at line 66. This is the getAffinityIdentifers() method. &lt;/p&gt;

&lt;p&gt;Affinity-topology-all.yang is checked into the affinity repo. &lt;/p&gt;


&lt;p&gt;====&lt;br/&gt;
    public CreateAffinityGroupInput build() &lt;/p&gt;
{
        return new CreateAffinityGroupInputImpl(this);
    }

&lt;p&gt;    private static class CreateAffinityGroupInputImpl implements CreateAffinityGroupInput {&lt;/p&gt;

&lt;p&gt;        private  final  List&amp;lt;AffinityIdentifiers&amp;gt; _affinityIdentifiers;&lt;br/&gt;
        private  final  String _id;&lt;br/&gt;
        private Map&amp;lt;Class&amp;lt;? extends Augmentation&amp;lt;CreateAffinityGroupInput&amp;gt;&amp;gt;, Augmentation&amp;lt;CreateAffinityGroupInput&amp;gt;&amp;gt; augmentation = new HashMap&amp;lt;&amp;gt;();&lt;/p&gt;

&lt;p&gt;        private CreateAffinityGroupInputImpl(CreateAffinityGroupInputBuilder builder) &lt;/p&gt;
{
            this._affinityIdentifiers = builder.getAffinityIdentifiers();
            this._id = builder.getId();
            this.augmentation.putAll(builder.augmentation);
        }

&lt;p&gt;        @Override&lt;br/&gt;
        public List&amp;lt;AffinityIdentifiers&amp;gt; getAffinityIdentifiers() &lt;/p&gt;
{
            return _affinityIdentifiers;
        }

&lt;p&gt;        @Override&lt;br/&gt;
        public String getId() &lt;/p&gt;
{
            return _id;
        }

&lt;p&gt;        @SuppressWarnings(&quot;unchecked&quot;)&lt;br/&gt;
        @Override&lt;br/&gt;
        public &amp;lt;E extends Augmentation&amp;lt;CreateAffinityGroupInput&amp;gt;&amp;gt; E getAugmentation(Class&amp;lt;E&amp;gt; augmentationType) {&lt;br/&gt;
            if (augmentationType == null) &lt;/p&gt;
{
                throw new IllegalArgumentException(&quot;Augmentation Type reference cannot be NULL!&quot;);
            }
&lt;p&gt;            return (E) augmentation.get(augmentationType);&lt;br/&gt;
	}&lt;/p&gt;

&lt;p&gt;    }&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Mac OS&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="22440">YANGTOOLS-20</key>
            <summary>Generated code throws compiler errors</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</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="-1">Unassigned</assignee>
                                    <reporter username="suchi.raman@plexxi.com">Suchitra Raman</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Sep 2013 18:28:27 +0000</created>
                <updated>Sun, 10 Apr 2022 18:34:52 +0000</updated>
                            <resolved>Thu, 26 Sep 2013 15:02:30 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="42528" author="mvitez@cisco.com" created="Wed, 25 Sep 2013 09:52:46 +0000"  >&lt;p&gt;Hello,&lt;br/&gt;
I can&apos;t replicate this bug with affinity-topology-all.yang which is currently in your repo. Did you make some local changes? For example at line 8 there is an import statement &quot;import inventory &lt;/p&gt;
{prefix inv;}
&lt;p&gt;&quot; which cannot be resolved (correct name should be opendaylight-inventory). Can you please attach actual affinity-topology-all.yang file for which code generation fails?&lt;/p&gt;</comment>
                            <comment id="42529" author="suchi.raman@plexxi.com" created="Wed, 25 Sep 2013 13:22:11 +0000"  >&lt;p&gt;(1) inventory vs. opendaylight-inventory. &lt;br/&gt;
Sorry I removed some content in order to pass pyang validation. &lt;br/&gt;
(FYI, calling this opendaylight-inventory also does not work. See error from pyang below. Any case, I&apos;ve commented this out of the file to get through the yangtools code gen issue. See item 2 below.)&lt;/p&gt;

&lt;p&gt;Pro:yang sraman$ pyang -p $YANG_MODPATH -f tree affinity-topology-all.yang&lt;br/&gt;
affinity-topology-all.yang:8: error: module &quot;opendaylight-inventory&quot; not found in search path&lt;br/&gt;
affinity-topology-all.yang:8: warning: imported module opendaylight-inventory not used&lt;br/&gt;
module: affinity-topology-all&lt;/p&gt;

&lt;p&gt;(2) The new file is checked in now, please pull from repo.&lt;/p&gt;</comment>
                            <comment id="42530" author="mvitez@cisco.com" created="Wed, 25 Sep 2013 15:08:34 +0000"  >&lt;p&gt;I tried it now with updated affinity-topology-all.yang on simple example and it works for me. I add this example in attachments.&lt;br/&gt;
Running &quot;mvn clean install&quot; for this example produce valid compilable java sources. Tested with version 0.5.7-SNAPSHOT and 0.5.8-SNAPSHOT. &lt;br/&gt;
Please try it and let me know if it works for you.&lt;/p&gt;</comment>
                            <comment id="42532" author="mvitez@cisco.com" created="Wed, 25 Sep 2013 15:09:27 +0000"  >&lt;p&gt;Attachment projectx.zip has been added with description: working example&lt;/p&gt;</comment>
                            <comment id="42531" author="suchi.raman@plexxi.com" created="Wed, 25 Sep 2013 16:36:30 +0000"  >&lt;p&gt;Error message with 0.5.8 says that there was another yang file with the same revision (not in the main tree, perhaps in the generated-sources, not sure). &lt;/p&gt;

&lt;p&gt;After updating the revision number this seemed to work fine.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="12959" name="projectx.zip" size="2929" author="mvitez@cisco.com" created="Wed, 25 Sep 2013 15:09:27 +0000"/>
                    </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>81</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=81]]></customfieldvalue>

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

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