diff --git a/okhttp/build.gradle b/okhttp/build.gradle index 1e41135259..b35e10bc44 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 7501c441d9..bee3169707 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 List immutableList(T... elements) { + public static List immutableList(T[] elements) { return Collections.unmodifiableList(Arrays.asList(elements.clone())); }