aboutsummaryrefslogtreecommitdiff
path: root/okhttp
diff options
context:
space:
mode:
authorEric Gribkoff <ericgribkoff@google.com>2018-08-28 11:53:15 -0700
committerGitHub <noreply@github.com>2018-08-28 11:53:15 -0700
commitd3cdfd08833e7b53e098e07d88f948797dbab6d9 (patch)
tree7c5192750317dd7805907de863773a5efb7dbf0e /okhttp
parent67ee4b6a8f43bfae9f367c7f05d9641d6397bbab (diff)
downloadgrpc-grpc-java-d3cdfd08833e7b53e098e07d88f948797dbab6d9.tar.gz
okhttp: use java 7, avoid compiler varargs warning (#4806)
Diffstat (limited to 'okhttp')
-rw-r--r--okhttp/build.gradle6
-rw-r--r--okhttp/third_party/okhttp/main/java/io/grpc/okhttp/internal/Util.java2
2 files changed, 1 insertions, 7 deletions
diff --git a/okhttp/build.gradle b/okhttp/build.gradle
index 1e4113525..b35e10bc4 100644
--- a/okhttp/build.gradle
+++ b/okhttp/build.gradle
@@ -1,11 +1,5 @@
description = "gRPC: OkHttp"
-// Workaround:
-// Util.java:219: warning: [unchecked] Possible heap pollution from parameterized vararg type T
-// Need to verify the @SafeVarargs annotation is safe for Android
-sourceCompatibility = 1.6
-targetCompatibility = 1.6
-
dependencies {
compile project(':grpc-core'),
libraries.okhttp,
diff --git a/okhttp/third_party/okhttp/main/java/io/grpc/okhttp/internal/Util.java b/okhttp/third_party/okhttp/main/java/io/grpc/okhttp/internal/Util.java
index 7501c441d..bee316970 100644
--- a/okhttp/third_party/okhttp/main/java/io/grpc/okhttp/internal/Util.java
+++ b/okhttp/third_party/okhttp/main/java/io/grpc/okhttp/internal/Util.java
@@ -216,7 +216,7 @@ public final class Util {
}
/** Returns an immutable list containing {@code elements}. */
- public static <T> List<T> immutableList(T... elements) {
+ public static <T> List<T> immutableList(T[] elements) {
return Collections.unmodifiableList(Arrays.asList(elements.clone()));
}