Use Uint64 for 'length' argument 55/95055/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 7 Feb 2021 10:20:21 +0000 (11:20 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 7 Feb 2021 10:32:00 +0000 (11:32 +0100)
commit9cb7a1889a5a032cbebf8543b614575792d97035
tree83c6dc7660921a4a102e27095c26252b0a834919
parent74e454ca97c9af9362c46bf7fe6d2c59ec2ea6d1
Use Uint64 for 'length' argument

RFC6020/7950 place an upper bound on the integral size of length
argument -- explictly calling out that an implementation does not
have to support size beyond unsigned 64bit.

Take advantage of this to lower our memory footprint, by using our
yang.common.Uint64 class instead of java.math.BigInteger. Also
use Uint64.intern() to minimize the number of actual instances we
create.

JIRA: YANGTOOLS-1206
Change-Id: Id112279eb9632d06a80e444d16bd5c825e4ba4ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/length/LengthStatementSupport.java