...
By applying a static modifier to the getInstance()method which returns the Singleton, allows the method to be accessed subsequently (after the initial call) without creating a new object.
...
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
References
TODO
Wiki Markup |
---|
\[[JLS 05|AA. Java References#JLS 05]\] [Chapter 17, Threads and Locks|http://java.sun.com/docs/books/jls/third_edition/html/memory.html] \[[Goetz 06|AA. Java References#Goetz 06]\] Section 14.2.4, Notification \[[Bloch 01|AA. Java References#Bloch 01]\] Item 50: Never invoke wait outside a loop |
...
CON31-J. Always invoke the wait() method inside a loop 08. Concurrency (CON) 09. Methods (MET)