You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jb...@apache.org on 2003/09/23 03:28:36 UTC

cvs commit: incubator-geronimo/specs/javamail/src/java/javax/mail/internet MailDateFormat.java

jboynes     2003/09/22 18:28:36

  Modified:    specs/javamail/src/java/javax/mail/internet
                        MailDateFormat.java
  Log:
  Applied patch for GERONIMO-86 from Jacek Laskowski
  Plus a couple of questions on impl
  
  Revision  Changes    Path
  1.4       +12 -5     incubator-geronimo/specs/javamail/src/java/javax/mail/internet/MailDateFormat.java
  
  Index: MailDateFormat.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/specs/javamail/src/java/javax/mail/internet/MailDateFormat.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MailDateFormat.java	4 Sep 2003 02:14:40 -0000	1.3
  +++ MailDateFormat.java	23 Sep 2003 01:28:36 -0000	1.4
  @@ -59,23 +59,29 @@
   // DO NOT add / change / or delete method signatures!
   //
   package javax.mail.internet;
  +
   import java.text.NumberFormat;
   import java.text.SimpleDateFormat;
   import java.util.Calendar;
  +import java.util.Locale;
  +
   /**
    * Parses dates of the form
  - * 
  + *
    * <code>Wed, 02 Jan 2003 23:59:59 -0100 (GMT)</code>
  - * 
  + *
    * <code>EEE,  d MMM yyyy HH:mm:ss Z (z)</code>
    * @version $Revision$ $Date$
    */
   public class MailDateFormat extends SimpleDateFormat {
  -    static final MailDateFormat INSTANCE = new MailDateFormat();
  +    static final MailDateFormat INSTANCE = new MailDateFormat(); // @todo jboynes: this does not seem to be used
       private static final String pattern = "EEE, d MMM yyyy HH:mm:ss Z (z)";
  +
       public MailDateFormat() {
  -        super(pattern);
  +        super(pattern, Locale.US);
       }
  +
  +    // @todo jboynes: are these commented out for a reason?
       //    public StringBuffer format(Date date, StringBuffer buffer, FieldPosition position) {
       //        return super.format(date,buffer,position);
       //    }
  @@ -85,6 +91,7 @@
       public void setCalendar(Calendar calendar) {
           throw new UnsupportedOperationException();
       }
  +
       public void setNumberFormat(NumberFormat format) {
           throw new UnsupportedOperationException();
       }