Remove or move java.awt dependencies
[nikiroo-utils.git] / src / be / nikiroo / fanfix / supported / Fimfiction.java
index 08d1712e9f4aa2ccebb8f8e07e1bb49085340bc4..7d2eec442db68757617eedf8956fb7782bf2e7e9 100644 (file)
@@ -1,6 +1,5 @@
 package be.nikiroo.fanfix.supported;
 
-import java.awt.image.BufferedImage;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
@@ -14,6 +13,7 @@ import java.util.Scanner;
 
 import be.nikiroo.fanfix.Instance;
 import be.nikiroo.fanfix.data.MetaData;
+import be.nikiroo.utils.Image;
 import be.nikiroo.utils.Progress;
 import be.nikiroo.utils.StringUtils;
 
@@ -173,7 +173,7 @@ class Fimfiction extends BasicSupport {
                return getLine(in, "class=\"description-text bbcode\"", 1);
        }
 
-       private BufferedImage getCover(InputStream in) {
+       private Image getCover(InputStream in) {
                // Note: the 'og:image' is the SMALL cover, not the full version
                String cover = getLine(in, "class=\"story_container__story_image\"", 1);
                if (cover != null) {
@@ -235,20 +235,23 @@ class Fimfiction extends BasicSupport {
                                                final URL value = new URL("http://www.fimfiction.net"
                                                                + line);
                                                urls.add(new Entry<String, URL>() {
+                                                       @Override
                                                        public URL setValue(URL value) {
                                                                return null;
                                                        }
 
+                                                       @Override
                                                        public String getKey() {
                                                                return key;
                                                        }
 
+                                                       @Override
                                                        public URL getValue() {
                                                                return value;
                                                        }
                                                });
                                        } catch (MalformedURLException e) {
-                                               Instance.syserr(e);
+                                               Instance.getTraceHandler().error(e);
                                        }
                                }
                        }