mirror of https://github.com/grpc/grpc-java.git
okhttp: use java 7, avoid compiler varargs warning (#4806)
This commit is contained in:
parent
67ee4b6a8f
commit
d3cdfd0883
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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()));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue