commit | 86c71b8458444dfcbf2c3919961b86bc92f65657 | [log] [tgz] |
---|---|---|
author | Shen Lin <ishawn.lin@gmail.com> | Fri Dec 09 11:06:29 2016 +0800 |
committer | Shen Lin <ishawn.lin@gmail.com> | Fri Dec 09 11:06:29 2016 +0800 |
tree | a3ae56ad0787f77b6ab7d2d6cd3023232539ebcc | |
parent | d20f9d3f2375c0eed25dbb76288f611328dcd5ab [diff] |
Fix NegativeArraySizeException in DiskBasedCache.streamToBytes Issue discussion can be found at https://groups.google.com/forum/#!topic/volley-users/0W-oI6za8VY
diff --git a/src/main/java/com/android/volley/toolbox/DiskBasedCache.java b/src/main/java/com/android/volley/toolbox/DiskBasedCache.java index c76d39a..f724d72 100644 --- a/src/main/java/com/android/volley/toolbox/DiskBasedCache.java +++ b/src/main/java/com/android/volley/toolbox/DiskBasedCache.java
@@ -122,6 +122,10 @@ VolleyLog.d("%s: %s", file.getAbsolutePath(), e.toString()); remove(key); return null; + } catch (NegativeArraySizeException e) { + VolleyLog.d("%s: %s", file.getAbsolutePath(), e.toString()); + remove(key); + return null; } finally { if (cis != null) { try {