I am working on this project. There is a class DefaultsHelper which has :
public class DefaultsHelper {
static SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd") ;
public static String getDate(int days)
{
GregorianCalendar c = new GregorianCalendar() ;
c.setTime(new Date()) ;
c.add(Calendar.DAY_OF_MONTH, days);
return df.format(c.getTime()) ;
}
}
In a web app - if two users where viewing a jsp whereby the getDate function was called at the exact same time - is it possible that the df object could get inconsistent and thereby not return expected values?
I think the DefaultsHelper was meant to be a utility class to stop having to instantiate new df objects