{
return;
}
String actualChecksum;
MD5Sum md5;
try
{
md5 = new MD5Sum();
md5.setFile( getFile() );
md5.execute();
actualChecksum = FileUtils.fileRead( checksumFile.getCanonicalPath() );
actualChecksum = actualChecksum.substring( 0, actualChecksum.length() - 1 );
}
catch ( Exception e )
{
return;
}
LOGGER.debug( "Actual checksum: '" + actualChecksum + "'" );
LOGGER.debug( "MD5 checksum: '" + md5.getChecksum() + "'" );
if ( !actualChecksum.equals( md5.getChecksum() ) )
{
throw new ChecksumVerificationException( MavenUtils.getMessage( "checksum.verification.error", getPath() ) );
}
}