[ https://issues.apache.org/jira/browse/BEAM-14299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Buqian Zheng updated BEAM-14299: -------------------------------- Summary: [BigqueryIO] MoreObjects.firstNonNull should not be called with null as default value (was: [BigqueryIO] MoreObjects.firstNonNull should not be called with null) > [BigqueryIO] MoreObjects.firstNonNull should not be called with null as > default value > ------------------------------------------------------------------------------------- > > Key: BEAM-14299 > URL: https://issues.apache.org/jira/browse/BEAM-14299 > Project: Beam > Issue Type: Bug > Components: io-java-gcp > Reporter: Buqian Zheng > Assignee: Buqian Zheng > Priority: P1 > Time Spent: 40m > Remaining Estimate: 0h > > [https://github.com/apache/beam/blob/2e0f79ef2b924da3306d0e55dffd4728809b9f3d/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWritesShardedRecords.java#L516] > if streamName.read() returns null, > [firstNonNull|https://guava.dev/releases/20.0/api/docs/com/google/common/base/MoreObjects.html#firstNonNull-T-T-] > will throw NullPointerException. We check the emptiness in the next line so > it's ok for stream to be empty string, we should use empty string as the > default value. -- This message was sent by Atlassian Jira (v8.20.1#820001)