Don't pass a non-positive parameter to Random.nextInt(int). Reviewed-by: chegar
Reviewed-by: bchristi, rriggs, psandoz