[FIXED JENKINS-18389] beware autoboxing

And don't rely on int pool even to compare to 0