Open
Description
See: https://discuss.lgtm.com/t/java-false-positives/1787/2
int x = ++i;
int y = ++i;
if (y < sb.length) {
byte[] hex = {sb[x], sb[y]};
^^^^^ -- flagged as alert
We know that (modulo overflow):
x
=y - 1
-->x
<y
y
<sb.length