diff options
author | Shen Lin <ishawn.lin@gmail.com> | 2016-12-09 11:06:29 +0800 |
---|---|---|
committer | Shen Lin <ishawn.lin@gmail.com> | 2016-12-09 11:06:29 +0800 |
commit | 86c71b8458444dfcbf2c3919961b86bc92f65657 (patch) | |
tree | a3ae56ad0787f77b6ab7d2d6cd3023232539ebcc /src/main/java/com | |
parent | d20f9d3f2375c0eed25dbb76288f611328dcd5ab (diff) | |
download | volley-86c71b8458444dfcbf2c3919961b86bc92f65657.tar.gz |
Fix NegativeArraySizeException in DiskBasedCache.streamToBytes
Issue discussion can be found at https://groups.google.com/forum/#!topic/volley-users/0W-oI6za8VY
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/android/volley/toolbox/DiskBasedCache.java | 4 |
1 files changed, 4 insertions, 0 deletions
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 @@ public class DiskBasedCache implements Cache { 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 { |