[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
Platform: 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.

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

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