Added string reason for shift assertion failure

This commit is contained in:
Collin Smith 2020-08-08 17:53:50 -07:00
parent 7ed92b1f49
commit c2ce0a3179

View File

@ -284,7 +284,7 @@ public class BitInput {
if (bits <= 0) return 0;
if (bits == Long.SIZE) return _readRaw(Long.SIZE);
final int shift = Long.SIZE - bits;
assert shift > 0;
assert shift > 0 : "shift(" + shift + ") <= " + 0;
final long value = readUnsigned(bits);
return value << shift >> shift;
}