Tag: singleton

Java Singelton fail

Exciting WTF moments at work (no joke, stuff I’ve seen coded by real Java professionals): So far, so good. Looks like a normal singelton pattern. This seems to be a little odd. But ok, I’ve seen this before for smuggling Mock-Instances during jUnit-Test into the otherwise static-referenced Singleton. Not nice but quite applicable when Unit-Tests are created for code fragments…

Read More »