From 776ad3c6d247c6fc1b2ec683fe23e60fb3830252 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sat, 2 Dec 2017 16:54:18 +0100 Subject: [PATCH] Don't check against NULL on NotNull --- src/be/nikiroo/fanfix/supported/BasicSupport.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/be/nikiroo/fanfix/supported/BasicSupport.java b/src/be/nikiroo/fanfix/supported/BasicSupport.java index c609c703..66ba64d6 100644 --- a/src/be/nikiroo/fanfix/supported/BasicSupport.java +++ b/src/be/nikiroo/fanfix/supported/BasicSupport.java @@ -202,7 +202,7 @@ public abstract class BasicSupport { * @param in * the input (the main resource) * - * @return the associated {@link MetaData} + * @return the associated {@link MetaData}, never NULL * * @throws IOException * in case of I/O error @@ -342,7 +342,7 @@ public abstract class BasicSupport { * @param pg * the optional progress reporter * - * @return the {@link Story} + * @return the {@link Story}, never NULL * * @throws IOException * in case of I/O error @@ -419,7 +419,7 @@ public abstract class BasicSupport { * @param pg * the optional progress reporter * - * @return the {@link Story} + * @return the {@link Story}, never NULL * * @throws IOException * in case of I/O error @@ -441,11 +441,6 @@ public abstract class BasicSupport { pgMeta.setProgress(pgMeta.getMax()); // 10% } - if (story == null) { - pg.setProgress(90); - return null; - } - pg.setName("Retrieving " + story.getMeta().getTitle()); setCurrentReferer(url); @@ -496,9 +491,7 @@ public abstract class BasicSupport { words += cc.getWords(); story.getChapters().add(cc); - if (story.getMeta() != null) { - story.getMeta().setWords(words); - } + story.getMeta().setWords(words); } finally { if (chapIn != null) { chapIn.close(); -- 2.27.0