From a1cc811169927628bf85ba911440864df80a0b0e Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Tue, 3 Sep 2024 00:38:28 +0200 Subject: [PATCH] Message, TransactionInput, TransactionOutput, TransactionOutPoint: remove deprecated methods bitcoinSerialize(), unsafeBitcoinSerialize() --- core/src/main/java/org/bitcoinj/core/Message.java | 14 -------------- .../java/org/bitcoinj/core/TransactionInput.java | 6 ------ .../org/bitcoinj/core/TransactionOutPoint.java | 6 ------ .../java/org/bitcoinj/core/TransactionOutput.java | 6 ------ .../test/java/org/bitcoinj/core/MessageTest.java | 2 -- .../org/bitcoinj/core/TransactionOutPointTest.java | 1 - 6 files changed, 35 deletions(-) diff --git a/core/src/main/java/org/bitcoinj/core/Message.java b/core/src/main/java/org/bitcoinj/core/Message.java index 09320d1371e..53873022601 100644 --- a/core/src/main/java/org/bitcoinj/core/Message.java +++ b/core/src/main/java/org/bitcoinj/core/Message.java @@ -48,18 +48,4 @@ default int getMessageSize() { * @return serialized data in Bitcoin protocol format */ byte[] serialize(); - - /** - * @deprecated use {@link #serialize()} - */ - @Deprecated - default byte[] bitcoinSerialize() { - return serialize(); - } - - /** @deprecated use {@link #serialize()} */ - @Deprecated - default byte[] unsafeBitcoinSerialize() { - return serialize(); - } } diff --git a/core/src/main/java/org/bitcoinj/core/TransactionInput.java b/core/src/main/java/org/bitcoinj/core/TransactionInput.java index 79515b7354a..e4f586c7da2 100644 --- a/core/src/main/java/org/bitcoinj/core/TransactionInput.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionInput.java @@ -185,12 +185,6 @@ public byte[] serialize() { return write(ByteBuffer.allocate(messageSize())).array(); } - /** @deprecated use {@link #serialize()} */ - @Deprecated - public byte[] bitcoinSerialize() { - return serialize(); - } - /** * Return the size of the serialized message. Note that if the message was deserialized from a payload, this * size can differ from the size of the original payload. diff --git a/core/src/main/java/org/bitcoinj/core/TransactionOutPoint.java b/core/src/main/java/org/bitcoinj/core/TransactionOutPoint.java index edb26ce801b..a03e31db9f9 100644 --- a/core/src/main/java/org/bitcoinj/core/TransactionOutPoint.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionOutPoint.java @@ -117,12 +117,6 @@ public byte[] serialize() { return write(ByteBuffer.allocate(BYTES)).array(); } - /** @deprecated use {@link #serialize()} */ - @Deprecated - public byte[] bitcoinSerialize() { - return serialize(); - } - /** @deprecated use {@link #BYTES} */ @Deprecated public int getMessageSize() { diff --git a/core/src/main/java/org/bitcoinj/core/TransactionOutput.java b/core/src/main/java/org/bitcoinj/core/TransactionOutput.java index e1c718501e5..e23c0073099 100644 --- a/core/src/main/java/org/bitcoinj/core/TransactionOutput.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionOutput.java @@ -148,12 +148,6 @@ public byte[] serialize() { return write(ByteBuffer.allocate(messageSize())).array(); } - /** @deprecated use {@link #serialize()} */ - @Deprecated - public byte[] bitcoinSerialize() { - return serialize(); - } - /** * Return the size of the serialized message. Note that if the message was deserialized from a payload, this * size can differ from the size of the original payload. diff --git a/core/src/test/java/org/bitcoinj/core/MessageTest.java b/core/src/test/java/org/bitcoinj/core/MessageTest.java index 0fb9c5d86dc..e8dd1a95077 100644 --- a/core/src/test/java/org/bitcoinj/core/MessageTest.java +++ b/core/src/test/java/org/bitcoinj/core/MessageTest.java @@ -22,8 +22,6 @@ public class MessageTest { @Test public void deprecatedMembers() { Message message = new UnknownMessage("dummy"); - message.bitcoinSerialize(); - message.unsafeBitcoinSerialize(); message.getMessageSize(); } } diff --git a/core/src/test/java/org/bitcoinj/core/TransactionOutPointTest.java b/core/src/test/java/org/bitcoinj/core/TransactionOutPointTest.java index e2b666de8fe..b6947c872dc 100644 --- a/core/src/test/java/org/bitcoinj/core/TransactionOutPointTest.java +++ b/core/src/test/java/org/bitcoinj/core/TransactionOutPointTest.java @@ -60,6 +60,5 @@ public void deprecatedMembers() { outpoint.getHash(); outpoint.getMessageSize(); outpoint.getIndex(); - outpoint.bitcoinSerialize(); } }