Skip to content

Commit fb18c0c

Browse files
committed
Some nit fixes.
1 parent b4e5199 commit fb18c0c

File tree

6 files changed

+223
-248
lines changed

6 files changed

+223
-248
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -638,10 +638,6 @@ public String getServiceAccountEmail() {
638638
public String getTrustBoundaryUrl() throws IOException {
639639
if (isWorkforcePoolConfiguration()) {
640640
Matcher matcher = WORKFORCE_PATTERN.matcher(getAudience());
641-
if (!matcher.matches()) {
642-
throw new IOException(
643-
"The provided audience is not in the correct format for a workforce pool.");
644-
}
645641
String poolId = matcher.group("pool");
646642
return String.format(WORKFORCE_POOL_URL_FORMAT, poolId);
647643
} else {

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,14 @@
3232
package com.google.auth.oauth2;
3333

3434
import static com.google.auth.Credentials.GOOGLE_DEFAULT_UNIVERSE;
35-
import static org.junit.Assert.*;
35+
import static org.junit.Assert.assertEquals;
36+
import static org.junit.Assert.assertFalse;
37+
import static org.junit.Assert.assertNotEquals;
38+
import static org.junit.Assert.assertNotNull;
39+
import static org.junit.Assert.assertNull;
40+
import static org.junit.Assert.assertSame;
41+
import static org.junit.Assert.assertTrue;
42+
import static org.junit.Assert.fail;
3643

3744
import com.google.api.client.http.HttpTransport;
3845
import com.google.api.client.json.GenericJson;

0 commit comments

Comments
 (0)