Nasty Java fun for the day (1)
public class Example {
public void bang() {
synchronized("lock") {
.....
Or synchronizing on getClass().getName() or any other interned string for that matter…
(Apparently jetty [via] has had some deadlock bugs from this anti-pattern)
↓ click the "like" button to share on twitter and facebook!