Code example for SimpleDateFormat

Methods: clone

0
    } 
    if (o instanceof Date == false)
    { 
      throw new BeanException("Failed to convert object of type " + o.getClass() + ": Not a Date.");
    } 
    final DateFormat format = (DateFormat) dateFormat.clone();
    return format.format((Date) o);
  } 
 
  public Object toPropertyValue(final String s) throws BeanException
  { 
    if (s == null)
    { 
      throw new NullPointerException();
    } 
    try 
    { 
      final DateFormat format = (DateFormat) dateFormat.clone();
      return format.parse(s);
    } 
    catch (ParseException e)