Journal cyranoVR's Journal: Public Service Announcement 4
java.text.SimpleDateFormat and java.text.DecimalFormat are not thread-safe.
Thank you and Happy Holidays!
java.text.SimpleDateFormat and java.text.DecimalFormat are not thread-safe.
Thank you and Happy Holidays!
Pound for pound, the amoeba is the most vicious animal on earth.
Really? (Score:2)
I don't track my own memory management, but I have to do my own concurrency access and thread management? Can you even do that well without being able to keep low-level records on which thread is modifying which memory?
Re: (Score:2)
java.lang.Thread [sun.com]
Also, Java 5 comes with a great concurrency library:
java.util.concurrent package description [sun.com]
How are you using them? (Score:2)
Re: (Score:2)
Because our product is a highly-concurrent (hundreds of threads, thousands of transactions per second) messaging engine, I have learned to always think about threading anytime I'm writing a block of code that isn't strictly local scope.
Here's the code I had to fix (verbatim):
public class FormatUtils {
private static final dateFormat = new SimpleDateFormat("yyyyMMdd");