{
String sum = ChecksumUtils.read( new File( src.getPath() + entry.getValue() ) );
verified = sum.equalsIgnoreCase( crcs.get( entry.getKey() ).toString() );
if ( !verified )
{
throw new ChecksumFailureException( sum, crcs.get( entry.getKey() ).toString() );
}
break;
}
catch ( IOException e )
{
// skip verify - try next algorithm
continue;
}
}
// all algorithms checked
if ( !verified )
{
throw new ChecksumFailureException( "no supported algorithms found" );
}
}
catch ( ChecksumFailureException e )
{
if ( RepositoryPolicy.CHECKSUM_POLICY_FAIL.equals( transfer.getChecksumPolicy() ) )