FileDocCategorySizeDatePackage
JunitTestRunnerFilter.javaAPI DocApache log4j 1.2.151820Sat Aug 25 00:09:34 BST 2007org.apache.log4j.util

JunitTestRunnerFilter

public class JunitTestRunnerFilter extends Object implements Filter

Fields Summary
org.apache.oro.text.perl.Perl5Util
util
Constructors Summary
Methods Summary
public java.lang.Stringfilter(java.lang.String in)
Filter out stack trace lines coming from the various JUnit TestRunners.


                
      
    if (in == null) {
      return null;
    }

    if (
      util.match(
          "/at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner/", in)) {
      return null;
    } else if (
      util.match(
          "/at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner/",
          in)) {
      return null;
    } else if (
      util.match(
          "/at com.intellij/",
          in)) {
      return null;
    } else if (in.indexOf("at junit.") >= 0 && in.indexOf("ui.TestRunner") >= 0) {
       return null;
    } else if (in.indexOf("org.apache.maven") >= 0) {
       return null;
    } else if (util.match("/\\sat /", in)) {
       return "\t" + in.trim();
    } else {
      return in;
    }