Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-61

Builder does not validate range of type

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 178

    Description

      Having the following definition:

      leaf semantics {
      type uint16;
      }

      results in the following builder:

      public CommunitiesBuilder setSemantics(Integer value) {

      this._semantics = value;
      return this;
      }

      e.g. any integer is allowed, which is obviously wrong, but the change is only ever detected if we attempt to put that field back into an uint16, making the source of the trouble hard to detect. The builder should enforce the range, making the offender fail.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: