Upgrading to errorprone 2.3.4 (https://github.com/apache/beam/pull/14148) required ignoring a lot of new warnings. We should fix the offending code and re-enable these warnings. Imported from Jira [BEAM-11936](https://issues.apache.org/jira/browse/BEAM-11936). Original Jira may contain additional context. Reported by: bhulette.