Package org.eclipse.aether.transfer
Class ChecksumFailureException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.eclipse.aether.RepositoryException
-
- org.eclipse.aether.transfer.ChecksumFailureException
-
- All Implemented Interfaces:
java.io.Serializable
public class ChecksumFailureException extends RepositoryException
Thrown in case of a checksum failure during an artifact/metadata download.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
actual
private java.lang.String
expected
private java.lang.String
expectedKind
private boolean
retryWorthy
-
Constructor Summary
Constructors Constructor 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)
Deprecated.Does not reveal expected checksum kind, use other constructor that provide that information as well.ChecksumFailureException(java.lang.String expected, java.lang.String expectedKind, java.lang.String actual)
Creates a new exception with the specified expected, expected kind 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.java.lang.String
getExpectedKind()
Gets the expected checksum kind for the downloaded artifact/metadata.boolean
isRetryWorthy()
Indicates whether the corresponding download is retry-worthy.-
Methods inherited from class org.eclipse.aether.RepositoryException
getMessage
-
-
-
-
Constructor Detail
-
ChecksumFailureException
@Deprecated public ChecksumFailureException(java.lang.String expected, java.lang.String actual)
Deprecated.Does not reveal expected checksum kind, use other constructor that provide that information as well.Creates a new exception with the specified expected and actual checksum. The resulting exception isretry-worthy
.- Parameters:
expected
- The expected checksum as declared by the hosting repository, may benull
.actual
- The actual checksum as computed from the local bytes, may benull
.
-
ChecksumFailureException
public ChecksumFailureException(java.lang.String expected, java.lang.String expectedKind, java.lang.String actual)
Creates a new exception with the specified expected, expected kind and actual checksum. The resulting exception isretry-worthy
.- Parameters:
expected
- The expected checksum as declared by the hosting repository, may benull
.expectedKind
- The expected checksum kind, may benull
.actual
- The actual checksum as computed from the local bytes, may benull
.- Since:
- 1.8.0
-
ChecksumFailureException
public ChecksumFailureException(java.lang.String message)
Creates a new exception with the specified detail message. The resulting exception is notretry-worthy
.- Parameters:
message
- The detail message, may benull
.
-
ChecksumFailureException
public ChecksumFailureException(java.lang.Throwable cause)
Creates a new exception with the specified cause. The resulting exception is notretry-worthy
.- Parameters:
cause
- The exception that caused this one, may benull
.
-
ChecksumFailureException
public ChecksumFailureException(java.lang.String message, java.lang.Throwable cause)
Creates a new exception with the specified detail message and cause. The resulting exception is notretry-worthy
.- Parameters:
message
- The detail message, may benull
.cause
- The exception that caused this one, may benull
.
-
ChecksumFailureException
public ChecksumFailureException(boolean retryWorthy, java.lang.String message, java.lang.Throwable cause)
Creates a new exception with the specified retry flag, detail message and cause.- Parameters:
retryWorthy
-true
if the exception is retry-worthy,false
otherwise.message
- The detail message, may benull
.cause
- The exception that caused this one, may benull
.
-
-
Method Detail
-
getExpected
public java.lang.String getExpected()
Gets the expected checksum for the downloaded artifact/metadata.- Returns:
- The expected checksum as declared by the hosting repository or
null
if unknown.
-
getExpectedKind
public java.lang.String getExpectedKind()
Gets the expected checksum kind for the downloaded artifact/metadata.- Returns:
- The expected checksum kind or
null
if unknown. - Since:
- 1.8.0
-
getActual
public java.lang.String getActual()
Gets the actual checksum for the downloaded artifact/metadata.- Returns:
- The actual checksum as computed from the local bytes or
null
if unknown.
-
isRetryWorthy
public boolean isRetryWorthy()
Indicates whether the corresponding download is retry-worthy.- Returns:
true
if retrying the download might solve the checksum failure,false
if the checksum failure is non-recoverable.
-
-