ByteArray: do not instantiate arrays if not needed 56/35356/3
authorRobert Varga <rovarga@cisco.com>
Wed, 24 Feb 2016 19:41:03 +0000 (20:41 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 24 Feb 2016 21:56:46 +0000 (21:56 +0000)
commit439698fb6b677d9c3e121a0031499b4c68b59c20
tree6ddb8b033a5958f9074f7a016ea703b2a3fee80a
parentecc4926c076c28468c1dcdcfdb0cd43e1c6472d9
ByteArray: do not instantiate arrays if not needed

Move array instantiation into the block where it is used, skipping it
completely in the case we have properly-sized array.

Change-Id: Ie5027f429830a39bfd2835cc5751cb3d6c27dd1e
Signed-off-by: Robert Varga <rovarga@cisco.com>
util/src/main/java/org/opendaylight/protocol/util/ByteArray.java