[Android] Ignore IllegalArgumentException for art download

Geoffrey Métais git at videolan.org
Wed Apr 19 14:46:03 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Apr 19 09:55:49 2017 +0200| [f9e70536f46f3e1965133079ef062e88818e3b7d] | committer: Geoffrey Métais

Ignore IllegalArgumentException for art download

> https://code.videolan.org/videolan/vlc-android/commit/f9e70536f46f3e1965133079ef062e88818e3b7d
---

 vlc-android/src/org/videolan/vlc/util/HttpImageLoader.java | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/util/HttpImageLoader.java b/vlc-android/src/org/videolan/vlc/util/HttpImageLoader.java
index 8810408..25cf9e4 100644
--- a/vlc-android/src/org/videolan/vlc/util/HttpImageLoader.java
+++ b/vlc-android/src/org/videolan/vlc/util/HttpImageLoader.java
@@ -47,7 +47,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.lang.ref.SoftReference;
 import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
 import java.net.URL;
 
 public class HttpImageLoader implements Callbacks {
@@ -120,10 +119,7 @@ public class HttpImageLoader implements Callbacks {
             InputStream in = new BufferedInputStream(urlConnection.getInputStream());
             icon = BitmapFactory.decodeStream(in);
             iconsMap.put(imageUrl, new SoftReference<>(icon));
-        } catch (MalformedURLException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
+        } catch (IOException|IllegalArgumentException ignored) {
         } finally {
             if (urlConnection != null)
                 urlConnection.disconnect();



More information about the Android mailing list