minor: Fixed potential NPE due to non synchronization access to m_writer.
This commit is contained in:
parent
e3cf6df872
commit
b2063cc784
|
@ -264,7 +264,7 @@ public class CLogFile extends Handler
|
|||
* @see java.util.logging.Handler#publish(java.util.logging.LogRecord)
|
||||
* @param record log record
|
||||
*/
|
||||
public void publish (LogRecord record)
|
||||
public synchronized void publish (LogRecord record)
|
||||
{
|
||||
if (!isLoggable (record) || m_writer == null)
|
||||
return;
|
||||
|
@ -328,7 +328,7 @@ public class CLogFile extends Handler
|
|||
* @see java.util.logging.Handler#close()
|
||||
* @throws java.lang.SecurityException
|
||||
*/
|
||||
public void close () throws SecurityException
|
||||
public synchronized void close () throws SecurityException
|
||||
{
|
||||
if (m_writer == null)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue