[YANGTOOLS-51] Classes wrapping integer values should check range Created: 05/Nov/13 Updated: 10/Apr/22 Resolved: 19/Nov/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 |
||
| External issue ID: | 134 |
| Description |
|
typedef nanotime { description "Absolute number of nanoseconds since the start of the UNIX epoch."; type uint64; units nanoseconds; }results in Nanotime class wrapping a BigInteger. The constructor of the class does not check for range, allowing a Nanotime to be constructed which does not fit an uint64. This applies to any range upgrades (such as uint8 being served by short), as well as when the range is restricted explicitly by a range YANG statement. |
| Comments |
| Comment by Martin Vitez [ 19/Nov/13 ] |
|
Implemented. |