tryPublish throws illegalArgumentException when the bounds checking fails
make argument order self consistent
Reformat using idea 11.