Skip to content

Commit 0c82fa5

Browse files
committed
---
yaml --- r: 1199 b: refs/heads/master c: 522ed56 h: refs/heads/master i: 1197: 08e1685 1195: 13999ae 1191: a13ce42 1183: 1c232f3 v: v3
1 parent 744bd90 commit 0c82fa5

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
@@ -1,4 +1,4 @@
11
---
2-
refs/heads/master: 22f52aee1eb371759e3b990e5bd70c5c12443621
2+
refs/heads/master: 522ed566e56023df01f5dfbac66913f88effdd64
33
refs/heads/travis: 0fa997e2fc9c6b61b2d91e6d163655aae67d44b6
44
refs/heads/gh-pages: 5a10432ecc75f29812e33a8236c900379509fe99

trunk/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)