Skip to content

Commit 7fd94c0

Browse files
elharochingor13
authored andcommitted
fix: cleanup unused code and deprecation warnings (#315)
1 parent 58fbdea commit 7fd94c0

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ private String getJwtAccess(URI uri) throws IOException {
330330
"generateJwtAccess threw an unexpected checked exception", e.getCause());
331331

332332
} catch (UncheckedExecutionException e) {
333-
Throwables.propagateIfPossible(e);
333+
Throwables.throwIfUnchecked(e);
334334
// Should never happen
335335
throw new IllegalStateException(
336336
"generateJwtAccess threw an unchecked exception that couldn't be rethrown", e);

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

-3
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ public class MockIAMCredentialsServiceTransport extends MockHttpTransport {
4848

4949
private static final String IAM_ACCESS_TOKEN_ENDPOINT =
5050
"https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/%s:generateAccessToken";
51-
private static final String IAM_ID_TOKEN_ENDPOINT =
52-
"https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/%s:generateIdToken";
5351
private static final String IAM_SIGN_ENDPOINT =
5452
"https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/%s:signBlob";
5553
private Integer tokenResponseErrorCode;
@@ -147,7 +145,6 @@ public LowLevelHttpResponse execute() throws IOException {
147145
GenericJson refreshContents = new GenericJson();
148146
refreshContents.setFactory(OAuth2Utils.JSON_FACTORY);
149147
refreshContents.put("signedBlob", base64.encode(signedBlob));
150-
String refreshText = refreshContents.toPrettyString();
151148
return new MockLowLevelHttpResponse()
152149
.setStatusCode(responseCode)
153150
.setContent(TestUtils.errorJson(errorMessage));

0 commit comments

Comments
 (0)