We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From d.bo...@gmail.com on July 31, 2013 13:15:30
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: http://code.google.com/p/owasp-esapi-java/issues/detail?id=305
The text was updated successfully, but these errors were encountered:
From d.bo...@gmail.com on July 31, 2013 10:23:11
Just not realised that volatile is in use, sry
Sorry, something went wrong.
This should be okay since singletonInstance in the Log4JLogFactory class is declared with the 'volatile' modifier. Closing the issue.
No branches or pull requests
From d.bo...@gmail.com on July 31, 2013 13:15:30
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: http://code.google.com/p/owasp-esapi-java/issues/detail?id=305
The text was updated successfully, but these errors were encountered: