Skip to content

Commit 1a16f38

Browse files
yebrahimchingor13
authored andcommitted
fix: typo in ComputeEngineCredentials exception message (#313)
* Typo fix * Update ComputeEngineCredentialsTest.java * Update ComputeEngineCredentialsTest.java
1 parent a1ab97c commit 1a16f38

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

oauth2_http/java/com/google/auth/oauth2/ComputeEngineCredentials.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public String getAccount() {
289289
try {
290290
serviceAccountEmail = getDefaultServiceAccount();
291291
} catch (IOException ex) {
292-
throw new RuntimeException("Failed to to get service account", ex);
292+
throw new RuntimeException("Failed to get service account", ex);
293293
}
294294
}
295295
return serviceAccountEmail;

oauth2_http/javatests/com/google/auth/oauth2/ComputeEngineCredentialsTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public LowLevelHttpResponse execute() throws IOException {
242242
credentials.getAccount();
243243
fail("Fetching default service account should have failed");
244244
} catch (RuntimeException e) {
245-
assertEquals("Failed to to get service account", e.getMessage());
245+
assertEquals("Failed to get service account", e.getMessage());
246246
assertNotNull(e.getCause());
247247
assertTrue(e.getCause().getMessage().contains("404"));
248248
}
@@ -277,7 +277,7 @@ public LowLevelHttpResponse execute() throws IOException {
277277
credentials.getAccount();
278278
fail("Fetching default service account should have failed");
279279
} catch (RuntimeException e) {
280-
assertEquals("Failed to to get service account", e.getMessage());
280+
assertEquals("Failed to get service account", e.getMessage());
281281
assertNotNull(e.getCause());
282282
assertTrue(e.getCause().getMessage().contains("Empty content"));
283283
}

0 commit comments

Comments
 (0)