logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject svn commit: r510720 - in /logging/log4j/trunk: src/java/org/apache/log4j/helpers/AbsoluteTimeDateFormat.java src/java/org/apache/log4j/helpers/DateTimeDateFormat.java tests/src/java/org/apache/log4j/helpers/DateLayoutTest.java
Date Thu, 22 Feb 2007 23:58:34 GMT
Author: carnold
Date: Thu Feb 22 15:58:33 2007
New Revision: 510720

URL: http://svn.apache.org/viewvc?view=rev&rev=510720
Log:
Bug 41373: DateLayoutTest fails if default Locale is not en_US

Modified:
    logging/log4j/trunk/src/java/org/apache/log4j/helpers/AbsoluteTimeDateFormat.java
    logging/log4j/trunk/src/java/org/apache/log4j/helpers/DateTimeDateFormat.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/DateLayoutTest.java

Modified: logging/log4j/trunk/src/java/org/apache/log4j/helpers/AbsoluteTimeDateFormat.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/java/org/apache/log4j/helpers/AbsoluteTimeDateFormat.java?view=diff&rev=510720&r1=510719&r2=510720
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/helpers/AbsoluteTimeDateFormat.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/helpers/AbsoluteTimeDateFormat.java Thu
Feb 22 15:58:33 2007
@@ -22,7 +22,6 @@
 import java.text.SimpleDateFormat;
 
 import java.util.Date;
-import java.util.Locale;
 import java.util.TimeZone;
 
 
@@ -72,14 +71,6 @@
   }
 
   /**
-   *  Create a new instance of AbsoluteTimeDateFormat with a locale.
-   * @param pattern 
-   */
-  public AbsoluteTimeDateFormat(String pattern, Locale locale) {
-    format = new SimpleDateFormat(pattern, locale);
-  }
-
-  /**
    *   Create a new instance of AbsoluteTimeDateFormat.
    *   @param timeZone time zone used in conversion, may not be null.
    */
@@ -121,5 +112,4 @@
   public Date parse(String s, ParsePosition pos) {
     return format.parse(s, pos);
   }
-  
 }

Modified: logging/log4j/trunk/src/java/org/apache/log4j/helpers/DateTimeDateFormat.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/java/org/apache/log4j/helpers/DateTimeDateFormat.java?view=diff&rev=510720&r1=510719&r2=510720
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/helpers/DateTimeDateFormat.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/helpers/DateTimeDateFormat.java Thu Feb
22 15:58:33 2007
@@ -16,7 +16,6 @@
 
 package org.apache.log4j.helpers;
 
-import java.util.Locale;
 import java.util.TimeZone;
 import java.util.Date;
 import java.text.DateFormatSymbols;
@@ -52,15 +51,6 @@
      */
     public DateTimeDateFormat(final TimeZone timeZone) {
         super(PATTERN, timeZone);
-    }
-
-    /**
-     * Create a new instance of DateTimeDateFormat.
-     *
-     * @param locale used in conversion, may not be null.
-     */
-    public DateTimeDateFormat(Locale locale) {
-      super(PATTERN, locale);
     }
 
 }

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/DateLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/DateLayoutTest.java?view=diff&rev=510720&r1=510719&r2=510720
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/DateLayoutTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/DateLayoutTest.java Thu Feb
22 15:58:33 2007
@@ -255,7 +255,9 @@
       calendar.clear();
       calendar.set(1970, 0, 1, 0, 0, 0);
       String actual = format.format(calendar.getTime());
-      assertEquals("01 Jan 1970 00:00:00,000", actual);
+      SimpleDateFormat df = new SimpleDateFormat("dd MMM yyyy HH:mm:ss,SSS");
+      String expected = df.format(calendar.getTime());
+      assertEquals(expected, actual);
   }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message