Closed
Description
In which file did you encounter the issue?
jdt://contents/google-cloud-core-1.12.0.jar/com.google.cloud/ServiceOptions.class
Did you change the file? If so, how?
No
Describe the issue
I used the example here:
https://cloud.google.com/bigquery/docs/authentication/service-account-file
// Instantiate a client.
BigQuery bigquery = BigQueryOptions.newBuilder().setCredentials(credentials).build().getService();
I verified that the properties set on the credentials object are not null.
The ServiceOptions builder object has a property called projectId that does not get set, despite the fact that the credentials property is set on the builder.
Either two fixes need to happen:
ServiceOptions.class:244 becomes
projectId = builder.projectId != null ? builder.getCredentials().getProjectId() : getDefaultProject();
Or,
setCredentials must set the projectId property on the builder.
Metadata
Metadata
Assignees
Labels
No labels