There is a double checked locking error on Log4JLogFactory.getInstance().
This issue could result in returning a partially constructed object.
For more details see:
http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
You could synchronize the whole method or to avoid the overhead of
synchronization, you could directly instantiate the object on the declaration
line.
like:
private static final LogFactory singletonInstance = new Log4JLogFactory();
Original issue reported on code.google.com by d.bo...@gmail.com on 31 Jul 2013 at 5:15
Original issue reported on code.google.com by
d.bo...@gmail.com
on 31 Jul 2013 at 5:15