Author: carnold
Date: Sat May 29 20:56:42 2010
New Revision: 949440

URL: http://svn.apache.org/viewvc?rev=949440&view=rev
Log:
Bug 48531: Unit tests fail for system dates after 2009-12-31 (copied from log4j)

Modified:
    
logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/log4j2-core/src/test/java/org/apache/log4j/util/Filter.java

Modified: 
logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/log4j2-core/src/test/java/org/apache/log4j/util/Filter.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/log4j2-core/src/test/java/org/apache/log4j/util/Filter.java?rev=949440&r1=949439&r2=949440&view=diff
==============================================================================
--- 
logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/log4j2-core/src/test/java/org/apache/log4j/util/Filter.java
 (original)
+++ 
logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/log4j2-core/src/test/java/org/apache/log4j/util/Filter.java
 Sat May 29 20:56:42 2010
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- *
+ * 
  *      http://www.apache.org/licenses/LICENSE-2.0
- *
+ * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,23 +18,21 @@
 package org.apache.log4j.util;
 
 public interface Filter {
+  
+  final String BASIC_PAT = "\\[main\\] (FATAL|ERROR|WARN|INFO|DEBUG)";
+  final String ISO8601_PAT = "^\\d{4}-\\d{2}-\\d{2} 
\\d{2}:\\d{2}:\\d{2},\\d{3}";  
+
   // 06 avr. 2002 18:36:32,036
   // 18 fevr. 2002 20:05:36,222
-  public static final String ABSOLUTE_DATE_AND_TIME_PAT =
-    "^\\d{1,2} .{2,6}\\.? 200\\d \\d{2}:\\d{2}:\\d{2},\\d{3}";
+  static public final String ABSOLUTE_DATE_AND_TIME_PAT = 
+                           "^\\d{1,2} .{2,6}\\.? 2\\d{3} 
\\d{2}:\\d{2}:\\d{2},\\d{3}";
 
   // 18:54:19,201
-  public static final String ABSOLUTE_TIME_PAT =
-    "^\\d{2}:\\d{2}:\\d{2},\\d{3}";
-  public static final String RELATIVE_TIME_PAT = "^\\d{1,10}";
-  final String BASIC_PAT = "\\[main\\] (FATAL|ERROR|WARN|INFO|DEBUG)";
-  final String ISO8601_PAT =
-    "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3}";
+  static public final String ABSOLUTE_TIME_PAT = 
+                           "^\\d{2}:\\d{2}:\\d{2},\\d{3}";
+
+  static public final String RELATIVE_TIME_PAT = "^\\d{1,10}";
+
 
-  /**
-   * This filter transforms the input string and returns the results as
-   * output. If the input should be ignored, this method returns null. 
-   * 
-   */
   String filter(String in) throws UnexpectedFormatException;
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to