Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make unsynchronized LoggerFactory field syncronized

Because the compiler or processor may reorder instructions, threads
are not guaranteed to see a completely initialized object if the
init function is called by two different threads.

Change-Id: I33342891fe098f84791bf8358e82f31a4bc99d92
Reviewed-by: Matt Ingenthron <>
Tested-by: Michael Wiederhold <>
  • Loading branch information...
commit d584446c647b89f0bb433fea43fbe983a709aee1 1 parent 388fd0e
@mikewied mikewied authored
2  src/main/java/net/spy/memcached/compat/log/
@@ -44,7 +44,7 @@
public final class LoggerFactory extends Object {
- private static LoggerFactory instance = null;
+ private static volatile LoggerFactory instance = null;
private final ConcurrentMap<String, Logger> instances;
private Constructor<? extends Logger> instanceConstructor;
Please sign in to comment.
Something went wrong with that request. Please try again.