Skip to content

Commit 2f1f25c

Browse files
Narrowing dependencies to avoid servlet-api
1 parent e2edc3c commit 2f1f25c

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

google-cloud-core/pom.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,19 @@
5252
</dependency>
5353
<dependency>
5454
<groupId>com.google.api-client</groupId>
55-
<artifactId>google-api-client-appengine</artifactId>
55+
<artifactId>google-api-client</artifactId>
56+
<version>1.21.0</version>
57+
<scope>compile</scope>
58+
<exclusions>
59+
<exclusion>
60+
<artifactId>guava-jdk5</artifactId>
61+
<groupId>com.google.guava</groupId>
62+
</exclusion>
63+
</exclusions>
64+
</dependency>
65+
<dependency>
66+
<groupId>com.google.http-client</groupId>
67+
<artifactId>google-http-client-appengine</artifactId>
5668
<version>1.21.0</version>
5769
<scope>compile</scope>
5870
<exclusions>

google-cloud-storage/src/main/java/com/google/cloud/storage/spi/v1/HttpStorageRpc.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import static com.google.common.base.MoreObjects.firstNonNull;
2020
import static com.google.common.base.Preconditions.checkArgument;
2121
import static java.net.HttpURLConnection.HTTP_NOT_FOUND;
22-
import static javax.servlet.http.HttpServletResponse.SC_REQUESTED_RANGE_NOT_SATISFIABLE;
2322

2423
import com.google.api.client.googleapis.batch.BatchRequest;
2524
import com.google.api.client.googleapis.batch.json.JsonBatchCallback;
@@ -70,6 +69,7 @@
7069
import java.util.LinkedList;
7170
import java.util.List;
7271
import java.util.Map;
72+
import org.apache.http.HttpStatus;
7373

7474
public class HttpStorageRpc implements StorageRpc {
7575

@@ -510,7 +510,7 @@ public Tuple<String, byte[]> read(StorageObject from, Map<Option, ?> options, lo
510510
return Tuple.of(etag, output.toByteArray());
511511
} catch (IOException ex) {
512512
StorageException serviceException = translate(ex);
513-
if (serviceException.getCode() == SC_REQUESTED_RANGE_NOT_SATISFIABLE) {
513+
if (serviceException.getCode() == HttpStatus.SC_REQUESTED_RANGE_NOT_SATISFIABLE) {
514514
return Tuple.of(null, new byte[0]);
515515
}
516516
throw serviceException;

0 commit comments

Comments
 (0)