Description
Byte array length calculation is defined as (bitset.length / 8) + 1 which has off by one errors on byte boundaries. For example, BitSet of length 0 is converted to a byte array of length 1. This was introduced as part of TEZ-972 since BitSet.toByteArray and valueOf were not supported as Tez supported Java 6 at the time and API was introduced in Java 7.