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
FieldsModifier and TypeFieldDescriptionstatic final ReportLimitsThe default limits: 32 MiB, 100,000 tests, 512-char names, 2,000-char messages, 8,000-char traces. -
Constructor Summary
ConstructorsConstructorDescriptionReportLimits(long maxFileBytes, int maxTests, int maxNameChars, int maxMsgChars, int maxTraceChars) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of themaxFileBytesrecord component.intReturns the value of themaxMsgCharsrecord component.intReturns the value of themaxNameCharsrecord component.intmaxTests()Returns the value of themaxTestsrecord component.intReturns the value of themaxTraceCharsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
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
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. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
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 '=='. -
maxFileBytes
Returns the value of themaxFileBytesrecord component.- Returns:
- the value of the
maxFileBytesrecord component
-
maxTests
Returns the value of themaxTestsrecord component.- Returns:
- the value of the
maxTestsrecord component
-
maxNameChars
Returns the value of themaxNameCharsrecord component.- Returns:
- the value of the
maxNameCharsrecord component
-
maxMsgChars
Returns the value of themaxMsgCharsrecord component.- Returns:
- the value of the
maxMsgCharsrecord component
-
maxTraceChars
Returns the value of themaxTraceCharsrecord component.- Returns:
- the value of the
maxTraceCharsrecord component
-