Class StackTraceProvider

java.lang.Object
org.apache.maven.surefire.api.report.StackTraceProvider

public class StackTraceProvider extends Object
Utility class for stack trace capture with filtering and truncation to reduce memory consumption. Filters out framework classes and limits to a maximum number of frames.
Since:
3.6.0
  • Field Details

  • Constructor Details

    • StackTraceProvider

      public StackTraceProvider()
  • Method Details

    • configure

      public static void configure(String prefixes)
      Configure framework prefixes to filter from stack traces. When specified, this REPLACES the default prefixes (does not add to them). To disable all filtering, pass an empty string. To use defaults, pass null.
      Parameters:
      prefixes - comma-separated list of package prefixes to filter, or empty to disable filtering
    • configure

      public static void configure(String prefixes, int maxFrameCount)
      Configure framework prefixes and maximum frame count for stack traces.
      Parameters:
      prefixes - comma-separated list of package prefixes to filter, or empty to disable filtering, or null for defaults
      maxFrameCount - maximum number of stack trace frames to capture; 0 or negative disables stack trace capture