mirror of https://github.com/apache/jclouds.git
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:
parent
05ec994f9e
commit
ac06e32e72
|
@ -130,9 +130,11 @@ public interface BlobBuilder {
|
||||||
PayloadBlobBuilder expires(Date expires);
|
PayloadBlobBuilder expires(Date expires);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @deprecated Callers should instead call BlobBuilder.contentMD5,
|
||||||
|
* usually with the results from Guava Hashing.md5().
|
||||||
* @see Payloads#calculateMD5
|
* @see Payloads#calculateMD5
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
PayloadBlobBuilder calculateMD5() throws IOException;
|
PayloadBlobBuilder calculateMD5() throws IOException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,6 +152,11 @@ public class BlobBuilderImpl implements BlobBuilder {
|
||||||
return builder.payload(payload);
|
return builder.payload(payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Callers should instead call BlobBuilder.contentMD5,
|
||||||
|
* usually with the results from Guava Hashing.md5().
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
@Override
|
@Override
|
||||||
public PayloadBlobBuilder calculateMD5() throws IOException {
|
public PayloadBlobBuilder calculateMD5() throws IOException {
|
||||||
return builder.payload(Payloads.calculateMD5(payload));
|
return builder.payload(Payloads.calculateMD5(payload));
|
||||||
|
|
Loading…
Reference in New Issue