ceki        2004/12/31 08:52:46

  Modified:    tests/src/java/org/apache/log4j/pattern
                        CachedDateFormatTest.java
  Log:
  'Z' is not a date pattern recognized by SimpleDateFormat in JDK versions 
earlier than 1.4.
  Testing with 'z' instead.
  
  Revision  Changes    Path
  1.12      +6 -6      
logging-log4j/tests/src/java/org/apache/log4j/pattern/CachedDateFormatTest.java
  
  Index: CachedDateFormatTest.java
  ===================================================================
  RCS file: 
/home/cvs/logging-log4j/tests/src/java/org/apache/log4j/pattern/CachedDateFormatTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- CachedDateFormatTest.java 27 Dec 2004 08:09:50 -0000      1.11
  +++ CachedDateFormatTest.java 31 Dec 2004 16:52:46 -0000      1.12
  @@ -141,7 +141,7 @@
       //     are optimized to reuse previous formatted value
       //     make a couple of nearly spaced calls
       SimpleDateFormat baseFormat =
  -         new SimpleDateFormat("EEE, MMM dd, HH:mm:ss.SSS Z", Locale.ENGLISH);
  +         new SimpleDateFormat("EEE, MMM dd, HH:mm:ss.SSS z", Locale.ENGLISH);
       DateFormat cachedFormat = new CachedDateFormat(baseFormat, 1000);
       //
       //   use a date in 2000 to attempt to confuse the millisecond locator
  @@ -164,7 +164,7 @@
       //   subsequent calls within one minute
       //     are optimized to reuse previous formatted value
       //     make a couple of nearly spaced calls
  -    Locale thai = new Locale("th");
  +    Locale thai = new Locale("th", "TH");
       SimpleDateFormat baseFormat =
            new SimpleDateFormat("EEE, MMM dd, HH:mm:ss.SSS Z", thai);
       DateFormat cachedFormat = new CachedDateFormat(baseFormat, 1000);
  @@ -227,7 +227,7 @@
      * Test of caching when less than three millisecond digits are specified.
      */
     public void test9() {
  -    DateFormat baseFormat = new SimpleDateFormat("yyyy-MMMM-dd HH:mm:ss,SS 
Z", Locale.US);
  +    DateFormat baseFormat = new SimpleDateFormat("yyyy-MMMM-dd HH:mm:ss,SS 
z", Locale.US);
       DateFormat cachedFormat = new CachedDateFormat(baseFormat, 1000);
       TimeZone cet = TimeZone.getTimeZone("GMT+1");
       cachedFormat.setTimeZone(cet);
  @@ -239,14 +239,14 @@
       c.setTimeZone(cet);
   
       String s = cachedFormat.format(c.getTime());
  -    assertEquals("2004-December-12 20:00:37,23 +0100", s);
  +    assertEquals("2004-December-12 20:00:37,23 GMT+01:00", s);
   
       c.set(2005, Calendar.JANUARY, 1, 0, 0);
       c.set(Calendar.SECOND, 13);
       c.set(Calendar.MILLISECOND, 905);
   
       s = cachedFormat.format(c.getTime());
  -    assertEquals("2005-January-01 00:00:13,905 +0100", s);
  +    assertEquals("2005-January-01 00:00:13,905 GMT+01:00", s);
     }
     
   
  @@ -394,4 +394,4 @@
       return suite;
     }
   
  -}
  \ No newline at end of file
  +}
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to