E5E1 Hacky Credentials Fix by schmidt-sebastian · Pull Request #3541 · googleapis/google-cloud-java · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ public Builder setTimestampsInSnapshotsEnabled(boolean value) {
@Override
@Nonnull
public FirestoreOptions build() {
if (this.credentials == null && this.credentialsProvider != null) {
try {
this.setCredentials(credentialsProvider.getCredentials());
} catch (IOException e) {
throw new RuntimeException("Failed to obtain credentials", e);
}
}

return new FirestoreOptions(this);
}
}
Expand Down
0