diff options
author | Koushik Dutta <koushd@gmail.com> | 2014-07-28 13:53:02 -0700 |
---|---|---|
committer | Koushik Dutta <koushd@gmail.com> | 2014-07-28 13:53:02 -0700 |
commit | 0e28ad9a43f799df307e7f0972d48e4c1108b4b9 (patch) | |
tree | 7b9ecf1c228dafb3eaab8a709d2e12c4b7c407ef /AndroidAsync | |
parent | 9953be594409605bef1c008fb0edd49a37c52415 (diff) | |
download | AndroidAsync-0e28ad9a43f799df307e7f0972d48e4c1108b4b9.tar.gz AndroidAsync-0e28ad9a43f799df307e7f0972d48e4c1108b4b9.tar.bz2 AndroidAsync-0e28ad9a43f799df307e7f0972d48e4c1108b4b9.zip |
more okhttp reshuffling and purging
Diffstat (limited to 'AndroidAsync')
-rw-r--r-- | AndroidAsync/src/com/koushikdutta/async/http/spdy/okhttp/internal/Util.java | 25 | ||||
-rw-r--r-- | AndroidAsync/test/src/com/koushikdutta/async/test/Handshake.java (renamed from AndroidAsync/src/com/koushikdutta/async/http/spdy/okhttp/Handshake.java) | 2 | ||||
-rw-r--r-- | AndroidAsync/test/src/com/koushikdutta/async/test/OkHttpTest.java | 1 |
3 files changed, 1 insertions, 27 deletions
diff --git a/AndroidAsync/src/com/koushikdutta/async/http/spdy/okhttp/internal/Util.java b/AndroidAsync/src/com/koushikdutta/async/http/spdy/okhttp/internal/Util.java index 63f2661..6c8c0e4 100644 --- a/AndroidAsync/src/com/koushikdutta/async/http/spdy/okhttp/internal/Util.java +++ b/AndroidAsync/src/com/koushikdutta/async/http/spdy/okhttp/internal/Util.java @@ -16,8 +16,6 @@ package com.koushikdutta.async.http.spdy.okhttp.internal; -import java.io.Closeable; -import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -31,29 +29,6 @@ public final class Util { } } - /** - * Closes {@code a} and {@code b}. If either close fails, this completes - * the other close and rethrows the first encountered exception. - */ - public static void closeAll(Closeable a, Closeable b) throws IOException { - Throwable thrown = null; - try { - a.close(); - } catch (Throwable e) { - thrown = e; - } - try { - b.close(); - } catch (Throwable e) { - if (thrown == null) thrown = e; - } - if (thrown == null) return; - if (thrown instanceof IOException) throw (IOException) thrown; - if (thrown instanceof RuntimeException) throw (RuntimeException) thrown; - if (thrown instanceof Error) throw (Error) thrown; - throw new AssertionError(thrown); - } - /** Returns an immutable copy of {@code list}. */ public static <T> List<T> immutableList(List<T> list) { return Collections.unmodifiableList(new ArrayList<T>(list)); diff --git a/AndroidAsync/src/com/koushikdutta/async/http/spdy/okhttp/Handshake.java b/AndroidAsync/test/src/com/koushikdutta/async/test/Handshake.java index b9ae5de..e53908f 100644 --- a/AndroidAsync/src/com/koushikdutta/async/http/spdy/okhttp/Handshake.java +++ b/AndroidAsync/test/src/com/koushikdutta/async/test/Handshake.java @@ -1,4 +1,4 @@ -package com.koushikdutta.async.http.spdy.okhttp; +package com.koushikdutta.async.test; import com.koushikdutta.async.http.spdy.okhttp.internal.Util; diff --git a/AndroidAsync/test/src/com/koushikdutta/async/test/OkHttpTest.java b/AndroidAsync/test/src/com/koushikdutta/async/test/OkHttpTest.java index 821de08..48fbf5b 100644 --- a/AndroidAsync/test/src/com/koushikdutta/async/test/OkHttpTest.java +++ b/AndroidAsync/test/src/com/koushikdutta/async/test/OkHttpTest.java @@ -4,7 +4,6 @@ package com.koushikdutta.async.test; import android.test.AndroidTestCase; import com.koushikdutta.async.ByteBufferList; -import com.koushikdutta.async.http.spdy.okhttp.Handshake; import com.koushikdutta.async.http.Protocol; import com.koushikdutta.async.util.Charsets; |