Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-4270

Appending "s" at the end of list name may not be correct always



    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.6.0
    • Component/s: None
    • Labels:
    • Story Points:



      Pls check adding "s" at the end of the list name would not always be correct and makes sense, also only the getter setter names are changed and not the comments

      so suggest not to include "s" for all the cases of list names or not inlcude at all.

      Yang file :
      module moduletest2 {
      yang-version 1;
      namespace "test2:level1:newlevel";
      prefix test;

      organization "huawei";
      contact "bharat.saraswal@huawei.com";
      description "test";

      revision 2015-02-12;
      container cont1 {

      list person { <----------------------- list name
      key name;
      leaf name

      { type string; }

      leaf place

      { type string; mandatory true; }

      container cont2 {
      leaf rank

      { type uint8; }




      Java file :

      • Copyright 2016 Open Networking Laboratory
      • Licensed under the Apache License, Version 2.0 (the "License");
      • you may not use this file except in compliance with the License.
      • You may obtain a copy of the License at
      • http://www.apache.org/licenses/LICENSE-2.0
      • Unless required by applicable law or agreed to in writing, software
      • distributed under the License is distributed on an "AS IS" BASIS,
      • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      • See the License for the specific language governing permissions and
      • limitations under the License.

      package org.onosproject.yang.gen.v1.test2.level1.newlevel.rev20150212.moduletest2;

      import java.util.List;
      import org.onosproject.yang.gen.v1.test2.level1.newlevel.rev20150212.moduletest2.cont1.Person;


      • Abstraction of an entity which provides functionalities of cont1.
        public interface Cont1 {


      • Returns the attribute person.
      • @return list of person
        List<Person> getPersons(); <-------------------------If list is a list of men or similar, then appending "s" at the end of list name would be wrong.


      • Builder for cont1.
        interface Cont1Builder { /** * Returns the attribute person. * * @return list of person */ List<Person> getPersons(); /** * Returns the builder object of person. * * @param persons list of person * @return builder object of person */ Cont1Builder setPersons(List<Person> persons); /** * Builds object of cont1. * * @return object of cont1. */ Cont1 build(); }



        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            bsaraswal bharat saraswal
            huawei-adarsh Adarsh m
            0 Vote for this issue
            1 Start watching this issue