[YANGTOOLS-61] Builder does not validate range of type Created: 28/Nov/13  Updated: 10/Apr/22  Resolved: 02/Dec/13

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Robert Varga Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 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.



 Comments   
Comment by Robert Varga [ 28/Nov/13 ]

Prevents the following negative test from being performed: https://git.opendaylight.org/gerrit/#/c/3200/

Comment by Martin Vitez [ 02/Dec/13 ]

Fixed:

https://git.opendaylight.org/gerrit/#/c/3326/

Generated at Wed Feb 07 20:52:09 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.