removed bug in getLogger() that caused a NullPointerException

This commit is contained in:
hns 2001-09-06 16:40:02 +00:00
parent 254a9d50f5
commit d8bf2153ee

View file

@ -76,7 +76,9 @@ public final class Logger {
*/ */
public static synchronized Logger getLogger (String dirname, String filename) throws IOException { public static synchronized Logger getLogger (String dirname, String filename) throws IOException {
File f = new File (dirname, filename); File f = new File (dirname, filename);
Logger log = (Logger) loggerMap.get (f); Logger log = null;
if (loggerMap != null)
log = (Logger) loggerMap.get (f);
if (log == null) if (log == null)
log = new Logger (dirname, filename); log = new Logger (dirname, filename);
return log; return log;