Record Class Packager.UnpackOutcome
java.lang.Object
java.lang.Record
org.ek9lang.core.Packager.UnpackOutcome
- Enclosing class:
Packager
public static record Packager.UnpackOutcome(boolean success, Optional<String> offendingEntry, Optional<String> problem)
extends Record
The outcome of
Packager.unpack(File, File): it succeeded; or an entry was refused (zip-slip) and offendingEntry
names it; or it failed part way and problem says why (a resource limit included).-
Constructor Summary
ConstructorsConstructorDescriptionUnpackOutcome(boolean success, Optional<String> offendingEntry, Optional<String> problem) Creates an instance of aUnpackOutcomerecord class. -
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.Returns the value of theoffendingEntryrecord component.problem()Returns the value of theproblemrecord component.booleansuccess()Returns the value of thesuccessrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UnpackOutcome
Creates an instance of aUnpackOutcomerecord class.- Parameters:
success- the value for thesuccessrecord componentoffendingEntry- the value for theoffendingEntryrecord componentproblem- the value for theproblemrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
offendingEntry
-
problem
-