Fix test that checks if javadoc needs to be updated.
Fix test that checks if javadoc needs to be updated.

The conditional test is based on the text returned by the command, not
the return code. So using print_and_do breaks the intended logic.

PiperOrigin-RevId: 304428130

google/tink,google/tink,google/tink,google/tink,google/tink,google/tink,google/tink,google/tink