Trim down TypeDefinitionAwareCodec 53/53653/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 22 Mar 2017 07:29:37 +0000 (08:29 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 23 Mar 2017 09:26:57 +0000 (10:26 +0100)
commit67a0dab285a9bd42b2deec9f2cf6f4df0366c6d5
tree5925eeaadf5d3ae3231ee2ef6e78e0bc71666d23
parent631451dffc88bef43df4834f6d9e241c0b5d57c5
Trim down TypeDefinitionAwareCodec

Storing an Optional runs contrary to its usual role and wastes
memory. We can simply calculate the optional and have a nullable
internal field, saving ~16 bytes per codec instance.

Change-Id: I184fbd8f390bf5703b3342a6dd09de599c236554
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/codec/TypeDefinitionAwareCodec.java