Skip to content
Permalink
Browse files
fix: cleanup unused code and deprecation warnings (#315)
  • Loading branch information
elharo authored and chingor13 committed Jul 31, 2019
1 parent 58fbdea commit 7fd94c0c2d2b900d1562d756eb3817f5349c4824
@@ -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);
@@ -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;
@@ -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));

0 comments on commit 7fd94c0

Please sign in to comment.