Use Downloader/Cache from utils
[fanfix.git] / src / be / nikiroo / fanfix / VersionCheck.java
index 3f63bf5e8819621eabe3c4ebb9e0a022647d8778..932449585f6e7e93a55cf1856b5b067965b4282d 100644 (file)
@@ -12,6 +12,12 @@ import java.util.Map;
 
 import be.nikiroo.utils.Version;
 
+/**
+ * Version checker: can check the current version of the program against a
+ * remote changelog, and list the missed updates and their description.
+ * 
+ * @author niki
+ */
 public class VersionCheck {
        private static final String url = "https://github.com/nikiroo/fanfix/raw/master/changelog.md";
 
@@ -102,8 +108,7 @@ public class VersionCheck {
 
                if (Instance.isVersionCheckNeeded()) {
                        try {
-                               InputStream in = Instance.getCache().openNoCache(new URL(url),
-                                               null);
+                               InputStream in = Instance.getCache().openNoCache(new URL(url));
                                BufferedReader reader = new BufferedReader(
                                                new InputStreamReader(in, "UTF-8"));
                                try {
@@ -135,7 +140,8 @@ public class VersionCheck {
                                        reader.close();
                                }
                        } catch (IOException e) {
-                               Instance.syserr(e);
+                               Instance.syserr(new IOException(
+                                               "Cannot download latest changelist on github.com", e));
                        }
                }