From 355e83b4baf09258de69043e18514799f2890d45 Mon Sep 17 00:00:00 2001 From: Alexey Danilov Date: Sun, 23 Apr 2017 17:52:12 +0300 Subject: [PATCH] #88: ignore ArrayIndexOutOfBoundsException on Android L while disconnecting connection --- .../main/java/com/danikula/videocache/HttpUrlSource.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/src/main/java/com/danikula/videocache/HttpUrlSource.java b/library/src/main/java/com/danikula/videocache/HttpUrlSource.java index bdd5a86..90599ba 100644 --- a/library/src/main/java/com/danikula/videocache/HttpUrlSource.java +++ b/library/src/main/java/com/danikula/videocache/HttpUrlSource.java @@ -95,8 +95,13 @@ public class HttpUrlSource implements Source { } catch (NullPointerException | IllegalArgumentException e) { String message = "Wait... but why? WTF!? " + "Really shouldn't happen any more after fixing https://github.com/danikula/AndroidVideoCache/issues/43. " + - "If you read it on your device log, please, notify me danikula@gmail.com or create issue here https://github.com/danikula/AndroidVideoCache/issues."; + "If you read it on your device log, please, notify me danikula@gmail.com or create issue here " + + "https://github.com/danikula/AndroidVideoCache/issues."; throw new RuntimeException(message, e); + } catch (ArrayIndexOutOfBoundsException e) { + LOG.error("Error closing connection correctly. Should happen only on Android L. " + + "If anybody know how to fix it, please visit https://github.com/danikula/AndroidVideoCache/issues/88. " + + "Until good solution is not know, just ignore this issue :(", e); } } }