Skip to content

Commit dac64ca

Browse files
committed
---
yaml --- r: 6515 b: refs/heads/tswast-patch-1 c: 522ed56 h: refs/heads/master i: 6513: f188d6e 6511: 66c2e50
1 parent a765f5e commit dac64ca

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 22f52aee1eb371759e3b990e5bd70c5c12443621
60+
refs/heads/tswast-patch-1: 522ed566e56023df01f5dfbac66913f88effdd64
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,11 @@ protected static String getAppEngineProjectId() {
450450
try {
451451
Class<?> factoryClass =
452452
Class.forName("com.google.appengine.api.appidentity.AppIdentityServiceFactory");
453+
Class<?> serviceClass =
454+
Class.forName("com.google.appengine.api.appidentity.AppIdentityService");
453455
Method method = factoryClass.getMethod("getAppIdentityService");
454456
Object appIdentityService = method.invoke(null);
455-
method = appIdentityService.getClass().getMethod("getServiceAccountName");
457+
method = serviceClass.getMethod("getServiceAccountName");
456458
String serviceAccountName = (String) method.invoke(appIdentityService);
457459
int indexOfAtSign = serviceAccountName.indexOf('@');
458460
return serviceAccountName.substring(0, indexOfAtSign);

0 commit comments

Comments
 (0)