removed bug in getLogger() that caused a NullPointerException
This commit is contained in:
parent
254a9d50f5
commit
d8bf2153ee
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue