Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
<auto-value.version>1.4.1</auto-value.version>

<jetty.version>9.4.46.v20220331</jetty.version>
<javax.ws.rs-api.version>2.0.1</javax.ws.rs-api.version>
<javax.ws.rs-api.version>2.1.1</javax.ws.rs-api.version>

<modernizer-maven-annotations.version>1.8.0</modernizer-maven-annotations.version>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.jclouds.googlecloudstorage.handlers;

import javax.inject.Singleton;
import javax.ws.rs.core.Response.Status;

import org.jclouds.http.HttpCommand;
import org.jclouds.http.HttpResponse;
Expand All @@ -27,10 +28,6 @@

@Singleton
public final class GoogleCloudStorageClientErrorRetryHandler implements HttpRetryHandler {
/** The user has sent too many requests in a given amount of time ("rate limiting"). */
// TODO: remove when upgrading to jax-rs api 2.1
private static final int TOO_MANY_REQUESTS = 429;

private final BackoffLimitedRetryHandler backoffHandler;

@Inject
Expand All @@ -40,7 +37,7 @@ protected GoogleCloudStorageClientErrorRetryHandler(BackoffLimitedRetryHandler b

@Override
public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) {
if (response.getStatusCode() == TOO_MANY_REQUESTS) {
if (response.getStatusCode() == Status.TOO_MANY_REQUESTS.getStatusCode()) {
return backoffHandler.shouldRetryRequest(command, response);
} else {
return false;
Expand Down