[
https://issues.apache.org/jira/browse/BEAM-14133?focusedWorklogId=745514&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-745514
]
ASF GitHub Bot logged work on BEAM-14133:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Mar/22 23:24
Start Date: 21/Mar/22 23:24
Worklog Time Spent: 10m
Work Description: chamikaramj commented on a change in pull request
#17133:
URL: https://github.com/apache/beam/pull/17133#discussion_r831619757
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServicesImpl.java
##########
@@ -1171,9 +1172,10 @@ public void deleteDataset(String projectId, String
datasetId)
if (!(e instanceof GoogleJsonResponseException)) {
return null;
}
- GoogleJsonError jsonError = ((GoogleJsonResponseException)
e).getDetails();
- GoogleJsonError.ErrorInfo errorInfo =
Iterables.getFirst(jsonError.getErrors(), null);
- return errorInfo;
+ return Optional.ofNullable(((GoogleJsonResponseException)
e).getDetails())
Review comment:
Can this be covered by a unit test ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 745514)
Time Spent: 20m (was: 10m)
> Fix potential NPE in BigQueryServicesImpl.getErrorInfo
> ------------------------------------------------------
>
> Key: BEAM-14133
> URL: https://issues.apache.org/jira/browse/BEAM-14133
> Project: Beam
> Issue Type: Improvement
> Components: io-java-gcp
> Reporter: Heejong Lee
> Assignee: Heejong Lee
> Priority: P2
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Fix potential NPE in BigQueryServicesImpl.getErrorInfo
--
This message was sent by Atlassian Jira
(v8.20.1#820001)