예제 #1
0
 public StackTraceFilter() {
   nameFilter = new ClassNameFilter();
   nameFilter.addFilter("org\\.infinitest\\.runner\\.*");
   nameFilter.addFilter("org\\.junit\\..*");
   nameFilter.addFilter("junit\\.framework\\..*");
   nameFilter.addFilter("sun\\.reflect\\..*");
   nameFilter.addFilter("java\\.lang\\.reflect\\.Method");
 }
예제 #2
0
 public List<StackTraceElement> filterStack(List<StackTraceElement> stackTrace) {
   List<StackTraceElement> filteredStackTrace = newArrayList();
   for (StackTraceElement each : stackTrace) {
     if (!nameFilter.match(each.getClassName())) {
       filteredStackTrace.add(each);
     }
   }
   return filteredStackTrace;
 }