tests: fix NPE, add BasicSupportUtilities tests
[nikiroo-utils.git] / src / be / nikiroo / fanfix / DataLoader.java
index abc958501a9fcf04e80be952de2c8ec92e59b6b9..d342580614c4a8441efcd967ad4ce37ed9c9879c 100644 (file)
@@ -95,7 +95,7 @@ public class DataLoader {
         * @param url
         *            the resource to open
         * @param support
-        *            the support to use to download the resource
+        *            the support to use to download the resource (can be NULL)
         * @param stable
         *            TRUE for more stable resources, FALSE when they often change
         * 
@@ -149,7 +149,7 @@ public class DataLoader {
         *            is also used for the cache ID if needed (so we can retrieve
         *            the content with this URL if needed)
         * @param support
-        *            the support to use to download the resource
+        *            the support to use to download the resource (can be NULL)
         * @param stable
         *            TRUE for more stable resources, FALSE when they often change
         * @param postParams
@@ -229,7 +229,7 @@ public class DataLoader {
         * @param url
         *            the resource to open
         * @param support
-        *            the support to use to download the resource
+        *            the support to use to download the resource (can be NULL)
         * @param stable
         *            TRUE for more stable resources, FALSE when they often change
         * 
@@ -278,11 +278,11 @@ public class DataLoader {
                        throws IOException {
                String format;
                if (cover) {
-                       format = Instance.getConfig().getString(Config.IMAGE_FORMAT_COVER)
+                       format = Instance.getConfig().getString(Config.FILE_FORMAT_IMAGE_FORMAT_COVER)
                                        .toLowerCase();
                } else {
                        format = Instance.getConfig()
-                                       .getString(Config.IMAGE_FORMAT_CONTENT).toLowerCase();
+                                       .getString(Config.FILE_FORMAT_IMAGE_FORMAT_CONTENT).toLowerCase();
                }
                saveAsImage(img, new File(target.toString() + "." + format), format);
        }