JCLOUDS-399: Deprecate BlobBuilder.calculateMD5

Callers should instead call BlobBuilder.contentMD5, usually with the
results from Guava Hashing.md5().  This narrows the API and removes a
strange IOException from callers.
This commit is contained in:
Andrew Gaul 2013-12-09 13:46:49 -08:00
parent 05ec994f9e
commit ac06e32e72
2 changed files with 8 additions and 1 deletions

View File

@ -130,9 +130,11 @@ public interface BlobBuilder {
PayloadBlobBuilder expires(Date expires);
/**
*
* @deprecated Callers should instead call BlobBuilder.contentMD5,
* usually with the results from Guava Hashing.md5().
* @see Payloads#calculateMD5
*/
@Deprecated
PayloadBlobBuilder calculateMD5() throws IOException;
}

View File

@ -152,6 +152,11 @@ public class BlobBuilderImpl implements BlobBuilder {
return builder.payload(payload);
}
/**
* @deprecated Callers should instead call BlobBuilder.contentMD5,
* usually with the results from Guava Hashing.md5().
*/
@Deprecated
@Override
public PayloadBlobBuilder calculateMD5() throws IOException {
return builder.payload(Payloads.calculateMD5(payload));