public class ChecksumFailureException extends RepositoryException
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
actual |
private java.lang.String |
expected |
private boolean |
retryWorthy |
Constructor and Description |
---|
ChecksumFailureException(boolean retryWorthy,
java.lang.String message,
java.lang.Throwable cause)
Creates a new exception with the specified retry flag, detail message and cause.
|
ChecksumFailureException(java.lang.String message)
Creates a new exception with the specified detail message.
|
ChecksumFailureException(java.lang.String expected,
java.lang.String actual)
Creates a new exception with the specified expected and actual checksum.
|
ChecksumFailureException(java.lang.String message,
java.lang.Throwable cause)
Creates a new exception with the specified detail message and cause.
|
ChecksumFailureException(java.lang.Throwable cause)
Creates a new exception with the specified cause.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getActual()
Gets the actual checksum for the downloaded artifact/metadata.
|
java.lang.String |
getExpected()
Gets the expected checksum for the downloaded artifact/metadata.
|
boolean |
isRetryWorthy()
Indicates whether the corresponding download is retry-worthy.
|
getMessage
private final java.lang.String expected
private final java.lang.String actual
private final boolean retryWorthy
public ChecksumFailureException(java.lang.String expected, java.lang.String actual)
retry-worthy
.expected
- The expected checksum as declared by the hosting repository, may be null
.actual
- The actual checksum as computed from the local bytes, may be null
.public ChecksumFailureException(java.lang.String message)
retry-worthy
.message
- The detail message, may be null
.public ChecksumFailureException(java.lang.Throwable cause)
retry-worthy
.cause
- The exception that caused this one, may be null
.public ChecksumFailureException(java.lang.String message, java.lang.Throwable cause)
retry-worthy
.message
- The detail message, may be null
.cause
- The exception that caused this one, may be null
.public ChecksumFailureException(boolean retryWorthy, java.lang.String message, java.lang.Throwable cause)
retryWorthy
- true
if the exception is retry-worthy, false
otherwise.message
- The detail message, may be null
.cause
- The exception that caused this one, may be null
.public java.lang.String getExpected()
null
if unknown.public java.lang.String getActual()
null
if unknown.public boolean isRetryWorthy()
true
if retrying the download might solve the checksum failure, false
if the checksum
failure is non-recoverable.