diff --git a/core/src/main/java/org/bitcoinj/core/Sha256Hash.java b/core/src/main/java/org/bitcoinj/core/Sha256Hash.java index 1e741492..a9d4e427 100644 --- a/core/src/main/java/org/bitcoinj/core/Sha256Hash.java +++ b/core/src/main/java/org/bitcoinj/core/Sha256Hash.java @@ -41,24 +41,11 @@ public class Sha256Hash implements Serializable, Comparable { 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 { * @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 { * @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 { 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. *