diff --git a/src/fr/devinsy/xid/FilePresenter.java b/src/fr/devinsy/xid/FilePresenter.java index f801c4d..732c4da 100644 --- a/src/fr/devinsy/xid/FilePresenter.java +++ b/src/fr/devinsy/xid/FilePresenter.java @@ -1,7 +1,9 @@ package fr.devinsy.xid; -import java.io.*; - +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.StringWriter; /** @@ -9,11 +11,7 @@ import java.io.*; */ public class FilePresenter extends DomPresenter { - static protected org.apache.log4j.Logger logger; - static - { - logger = org.apache.log4j.Logger.getLogger (FilePresenter.class); - } + static protected org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (FilePresenter.class); protected String sourceFilePathname; protected long sourceFileTime; @@ -90,14 +88,7 @@ public class FilePresenter extends DomPresenter // Get the good tree. File source = new File (this.sourceFilePathname); - if (source == null) - { - String errorMessage = "source file not defined"; - logger.error (errorMessage); - result = null; - throw new Exception (errorMessage); - } - else if (!source.exists ()) + if (!source.exists ()) { String errorMessage = "source file defined but not found (" + this.sourceFilePathname + ")"; logger.error (errorMessage);