BUG-7464: Enable parallel CNode size computation 50/49950/9
authorRobert Varga <rovarga@cisco.com>
Mon, 2 Jan 2017 18:35:10 +0000 (19:35 +0100)
committerRobert Varga <rovarga@cisco.com>
Tue, 10 Jan 2017 19:12:11 +0000 (20:12 +0100)
commit365457035d8505d813902096e4ca0b226760cc29
treef09cc458ce50df39226759a96871366bd07c6373
parent88a92ba9395d82a38dd2250451a2c88bfe9ed63f
BUG-7464: Enable parallel CNode size computation

Re-enable code which was disabled during the initial port
from Scala, as ThreadLocalRandom is available in Java 7
and newer.

Also make the code a bit smarter by adding special-cases
for empty and single-entry arrays, when it does not make
sense to generate a random number.

Change-Id: Ie7fa98450bf1381a14a7a5e63fd9de6f3b1d17a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
third-party/triemap/src/main/java/org/opendaylight/yangtools/triemap/CNode.java