Record Class ReportLimits

java.lang.Object
java.lang.Record
org.apache.juneau.terminal.report.ReportLimits
Record Components:
maxFileBytes - The largest file that is read; larger files are skipped with a warning.
maxTests - The most tests kept from one file; reading stops there with a warning.
maxNameChars - The longest suite or test name kept; longer names are clipped.
maxMsgChars - The longest failure message kept.
maxTraceChars - The longest stack trace kept.

public record ReportLimits(long maxFileBytes, int maxTests, int maxNameChars, int maxMsgChars, int maxTraceChars) extends Record
Bounds applied while reading a report, so a hostile or runaway file cannot exhaust memory.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ReportLimits
    The default limits: 32 MiB, 100,000 tests, 512-char names, 2,000-char messages, 8,000-char traces.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReportLimits(long maxFileBytes, int maxTests, int maxNameChars, int maxMsgChars, int maxTraceChars)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the maxFileBytes record component.
    int
    Returns the value of the maxMsgChars record component.
    int
    Returns the value of the maxNameChars record component.
    int
    Returns the value of the maxTests record component.
    int
    Returns the value of the maxTraceChars record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT

      public static final ReportLimits DEFAULT
      The default limits: 32 MiB, 100,000 tests, 512-char names, 2,000-char messages, 8,000-char traces.
  • Constructor Details

    • ReportLimits

      public ReportLimits(long maxFileBytes, int maxTests, int maxNameChars, int maxMsgChars, int maxTraceChars)
      Constructor.
      Throws:
      IllegalArgumentException - If any value is not positive.
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • maxFileBytes

      public long maxFileBytes()
      Returns the value of the maxFileBytes record component.
      Returns:
      the value of the maxFileBytes record component
    • maxTests

      public int maxTests()
      Returns the value of the maxTests record component.
      Returns:
      the value of the maxTests record component
    • maxNameChars

      public int maxNameChars()
      Returns the value of the maxNameChars record component.
      Returns:
      the value of the maxNameChars record component
    • maxMsgChars

      public int maxMsgChars()
      Returns the value of the maxMsgChars record component.
      Returns:
      the value of the maxMsgChars record component
    • maxTraceChars

      public int maxTraceChars()
      Returns the value of the maxTraceChars record component.
      Returns:
      the value of the maxTraceChars record component