Skip to content

Commit b79efb3

Browse files
committed
http: Remove dependency on common.collect
https://codereview.appspot.com/6949050/
1 parent e09f872 commit b79efb3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import com.google.api.client.util.Types;
2626
import com.google.common.base.Preconditions;
2727
import com.google.common.base.Throwables;
28-
import com.google.common.collect.Lists;
2928

3029
import java.io.IOException;
3130
import java.io.Writer;
@@ -75,7 +74,7 @@ public HttpHeaders() {
7574

7675
/** {@code "Accept-Encoding"} header. */
7776
@Key("Accept-Encoding")
78-
private List<String> acceptEncoding = Lists.newArrayList("gzip");
77+
private List<String> acceptEncoding = new ArrayList<String>(Collections.singleton("gzip"));
7978

8079
/** {@code "Authorization"} header. */
8180
@Key("Authorization")
@@ -974,7 +973,7 @@ private <T> List<T> getAsList(T passedValue) {
974973
if (passedValue == null) {
975974
return null;
976975
}
977-
List<T> result = Lists.<T>newArrayList();
976+
List<T> result = new ArrayList<T>();
978977
result.add(passedValue);
979978
return result;
980979
}
@@ -1014,7 +1013,7 @@ public List<String> getHeaderStringValues(String name) {
10141013
}
10151014
Class<? extends Object> valueClass = value.getClass();
10161015
if (value instanceof Iterable<?> || valueClass.isArray()) {
1017-
List<String> values = Lists.newArrayList();
1016+
List<String> values = new ArrayList<String>();
10181017
for (Object repeatedValue : Types.iterableOf(value)) {
10191018
values.add(toStringValue(repeatedValue));
10201019
}

0 commit comments

Comments
 (0)