From cd6eabffcdeed485aba088336fa473a6b85c752d Mon Sep 17 00:00:00 2001 From: Cody Oss <6331106+codyoss@users.noreply.github.com> Date: Thu, 9 Jan 2020 13:15:30 -0700 Subject: [PATCH] fix: cast to proper interface (#124) Fixes #123 --- .../src/main/java/com/google/cloud/ServiceOptions.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java b/google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java index 792609f4b4..2a84403af0 100644 --- a/google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java +++ b/google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java @@ -218,7 +218,7 @@ public B setCredentials(Credentials credentials) { } if (this.quotaProjectId == null && credentials instanceof QuotaProjectIdProvider) { - this.quotaProjectId = ((ServiceAccountCredentials) credentials).getQuotaProjectId(); + this.quotaProjectId = ((QuotaProjectIdProvider) credentials).getQuotaProjectId(); } return self(); }