Monthly Archives: August 2010

Why you should NOT use log.isDebugEnabled()

Several people are telling you that you should wrap all logging statements by a isXXXEnabled method call (where XXX is the logging level) to prevent unecessary object creations. I do not recomment this! -It’s not part of your business logic … Continue reading

Posted in Java, Projects, Tips | 2 Comments

Standard Java collections are not thread-safe

As I worked for years now in different projects I experienced that many Java programmers think it’s enough to synchronize methods modifying the state of a Collection (put, add, remove, …).I guess they think that an access method (like get) … Continue reading

Posted in Java, Tips | Leave a comment