Skip to content

Commit

Permalink
fix: cleanup unused code and deprecation warnings (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo authored and chingor13 committed Jul 31, 2019
1 parent 58fbdea commit 7fd94c0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Expand Up @@ -330,7 +330,7 @@ private String getJwtAccess(URI uri) throws IOException {
"generateJwtAccess threw an unexpected checked exception", e.getCause());

} catch (UncheckedExecutionException e) {
Throwables.propagateIfPossible(e);
Throwables.throwIfUnchecked(e);
// Should never happen
throw new IllegalStateException(
"generateJwtAccess threw an unchecked exception that couldn't be rethrown", e);
Expand Down
Expand Up @@ -48,8 +48,6 @@ public class MockIAMCredentialsServiceTransport extends MockHttpTransport {

private static final String IAM_ACCESS_TOKEN_ENDPOINT =
"https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/%s:generateAccessToken";
private static final String IAM_ID_TOKEN_ENDPOINT =
"https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/%s:generateIdToken";
private static final String IAM_SIGN_ENDPOINT =
"https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/%s:signBlob";
private Integer tokenResponseErrorCode;
Expand Down Expand Up @@ -147,7 +145,6 @@ public LowLevelHttpResponse execute() throws IOException {
GenericJson refreshContents = new GenericJson();
refreshContents.setFactory(OAuth2Utils.JSON_FACTORY);
refreshContents.put("signedBlob", base64.encode(signedBlob));
String refreshText = refreshContents.toPrettyString();
return new MockLowLevelHttpResponse()
.setStatusCode(responseCode)
.setContent(TestUtils.errorJson(errorMessage));
Expand Down

0 comments on commit 7fd94c0

Please sign in to comment.