I forgot to mention imortant changes in LineNumberFilter. This filter transform line number information in stack traces into the string "X".
For example
at some.where.SomePlace(SomePlace.java:23)
is transformed to
at some.where.SomePlace(X)
similarly
at some.where.SomePlace(NativeMethod)
is transformed to
at some.where.SomePlace(X)
This solves the problem with JDK methods which are java in some versions and native in others.
All changes apply to the default (1.3) branch. I am not going to apply to them 1.2.
At 16:44 13.11.2002 +0000, you wrote:
ceki 2002/11/13 08:44:58
Modified: tests/src/java/org/apache/log4j MinimumTestCase.java
PatternLayoutTestCase.java
tests/src/java/org/apache/log4j/customLogger
XLoggerTestCase.java
tests/src/java/org/apache/log4j/net
SocketServerTestCase.java
tests/src/java/org/apache/log4j/util LineNumberFilter.java
Transformer.java
tests/src/java/org/apache/log4j/varia
ErrorHandlerTestCase.java
tests/src/java/org/apache/log4j/xml DOMTestCase.java
XMLLayoutTestCase.java
Added: tests/src/java/org/apache/log4j/util SunReflectFilter.java
Log:
Added SunReflectFilter.java which removes stack trace lines containing the pattern
/at sun.reflect/
This filter has been added to many of our existing test cases in order to
compensate the differences between JDK 1.3 and JDK 1.4 allowing them to run
on both platforms indiscriminately.
Test failures that have been occuring since gump moved to JDK 1.4 should not disappear.
Index: LineNumberFilter.java
===================================================================
RCS file: /home/cvs/jakarta-log4j/tests/src/java/org/apache/log4j/util/LineNumberFilter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LineNumberFilter.java 25 Apr 2002 21:17:36 -0000 1.2
+++ LineNumberFilter.java 13 Nov 2002 16:44:54 -0000 1.3
@@ -18,8 +18,11 @@
public
String filter(String in) {
if(util.match("/\\(.*:\\d{1,4}\\)/", in)) {
- return util.substitute("s/:\\d{1,4}\\)/:XXX)/", in);
- } else {
+ return util.substitute("s/\\(.*:\\d{1,4}\\)/\\(X\\)/", in);
+
+ } else if (util.match("/\\(Native Method\\)/", in)) {
+ return util.substitute("s/\\(Native Method\\)/\\(X\\)/", in);
+ }else {
return in;
}
}
--
Ceki TCP implementations will follow a general principle of robustness: be conservative in what you do, be liberal in what you accept from others. -- Jon Postel, RFC 793
-- To unsubscribe, e-mail: <mailto:log4j-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:log4j-dev-help@;jakarta.apache.org>