You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Beam JIRA Bot (Jira)" <ji...@apache.org> on 2022/04/12 15:15:00 UTC

[jira] [Updated] (BEAM-14299) [BigqueryIO] MoreObjects.firstNonNull should not be called with null

     [ https://issues.apache.org/jira/browse/BEAM-14299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Beam JIRA Bot updated BEAM-14299:
---------------------------------
    Status: Open  (was: Triage Needed)

> [BigqueryIO] MoreObjects.firstNonNull should not be called with null
> --------------------------------------------------------------------
>
>                 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
>
> [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 nullness in the next line so it's ok for stream to be null, we should assign streamName.read() to stream directly.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)