I am using simple date format in my app in following way in the class:
static SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy"); public static myFunction(final String strDate) { Date endDate = null; endDate = MyClass.sdf.parse(strDate); } I am using FindBugs which is giving the following bug in above code:
"As the JavaDoc states, DateFormats are inherently unsafe for multithreaded use. The detector has found a call to an instance of DateFormat that has been obtained via a static field. This looks suspicous."
Can someone please explain the bug. I am not able to understand what above message is trying to tell.
Thanks for reading!!