Same here, if the range covers the boundary (Long.MAX - Long.MIN), this will fail.