--- old/src/share/classes/java/util/logging/MemoryHandler.java 2013-08-29 18:14:52.000000000 +0200 +++ new/src/share/classes/java/util/logging/MemoryHandler.java 2013-08-29 18:14:52.000000000 +0200 @@ -188,6 +188,7 @@ * @param record description of the log event. A null record is * silently ignored and is not published */ + @Override public synchronized void publish(LogRecord record) { if (!isLoggable(record)) { return; @@ -227,6 +228,7 @@ * Note that the current contents of the MemoryHandler * buffer are not written out. That requires a "push". */ + @Override public void flush() { target.flush(); } @@ -238,6 +240,7 @@ * @exception SecurityException if a security manager exists and if * the caller does not have LoggingPermission("control"). */ + @Override public void close() throws SecurityException { target.close(); setLevel(Level.OFF); @@ -258,7 +261,9 @@ } LogManager manager = LogManager.getLogManager(); checkPermission(); - pushLevel = newLevel; + synchronized (this) { + pushLevel = newLevel; + } } /** @@ -283,6 +288,7 @@ * @return true if the LogRecord would be logged. * */ + @Override public boolean isLoggable(LogRecord record) { return super.isLoggable(record); }