Sha256Hash: Remove deprecated methods.
@@ -41,24 +41,11 @@ public class Sha256Hash implements Serializable, Comparable<Sha256Hash> {
private final byte[] bytes;
- /**
- * Use {@link #wrap(byte[])} instead.
- */
- @Deprecated
- public Sha256Hash(byte[] rawHashBytes) {
+ private Sha256Hash(byte[] rawHashBytes) {
checkArgument(rawHashBytes.length == LENGTH);
this.bytes = rawHashBytes;
}
- /**
- * Use {@link #wrap(String)} instead.
- */
- @Deprecated
- public Sha256Hash(String hexString) {
- checkArgument(hexString.length() == LENGTH * 2);
- this.bytes = Utils.HEX.decode(hexString);
- }
-
/**
* Creates a new instance that wraps the given hash value.
*
@@ -66,7 +53,6 @@ public class Sha256Hash implements Serializable, Comparable<Sha256Hash> {
* @return a new instance
* @throws IllegalArgumentException if the given array length is not exactly 32
*/
- @SuppressWarnings("deprecation") // the constructor will be made private in the future
public static Sha256Hash wrap(byte[] rawHashBytes) {
return new Sha256Hash(rawHashBytes);
}
@@ -90,17 +76,10 @@ public class Sha256Hash implements Serializable, Comparable<Sha256Hash> {
* @return a new instance
* @throws IllegalArgumentException if the given array length is not exactly 32
*/
- @SuppressWarnings("deprecation") // the constructor will be made private in the future
public static Sha256Hash wrapReversed(byte[] rawHashBytes) {
return wrap(Utils.reverseBytes(rawHashBytes));
}
- /** Use {@link #of(byte[])} instead: this old name is ambiguous. */
- @Deprecated
- public static Sha256Hash create(byte[] contents) {
- return of(contents);
- }
-
/**
* Creates a new instance containing the calculated (one-time) hash of the given bytes.
*
@@ -111,12 +90,6 @@ public class Sha256Hash implements Serializable, Comparable<Sha256Hash> {
return wrap(hash(contents));
}
- /** Use {@link #twiceOf(byte[])} instead: this old name is ambiguous. */
- @Deprecated
- public static Sha256Hash createDouble(byte[] contents) {
- return twiceOf(contents);
- }
-
/**
* Creates a new instance containing the hash of the calculated hash of the given bytes.
*
