From: David ‘Bombe’ Roden Date: Thu, 2 Jan 2025 22:08:52 +0000 (+0100) Subject: 🗑️ Deprecate ListPeerNotes constructor without both identifiers X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=1f31d787112c53854ec90a5230519b33eecbaddb;p=jFCPlib.git 🗑️ Deprecate ListPeerNotes constructor without both identifiers --- diff --git a/src/main/java/net/pterodactylus/fcp/ListPeerNotes.java b/src/main/java/net/pterodactylus/fcp/ListPeerNotes.java index 67de7d5..fdd570e 100644 --- a/src/main/java/net/pterodactylus/fcp/ListPeerNotes.java +++ b/src/main/java/net/pterodactylus/fcp/ListPeerNotes.java @@ -29,14 +29,22 @@ public class ListPeerNotes extends FcpMessage { * Creates a new “ListPeerNotes” request that lists all notes of the * specified node. * - * @param nodeIdentifier - * The identifier of the node + * @param nodeIdentifier The identifier of the node + * @deprecated Use {@link #ListPeerNotes(String, String)} instead. */ + @Deprecated public ListPeerNotes(String nodeIdentifier) { super("ListPeerNotes"); setField("NodeIdentifier", nodeIdentifier); } + /** + * Creates a new “ListPeerNotes” request that lists all notes of the + * specified node. + * + * @param identifier The identifier for the replies + * @param nodeIdentifier The identifier of the node + */ public ListPeerNotes(String identifier, String nodeIdentifier) { this(nodeIdentifier); setField("Identifier", identifier); diff --git a/src/main/java/net/pterodactylus/fcp/highlevel/FcpClient.java b/src/main/java/net/pterodactylus/fcp/highlevel/FcpClient.java index a7d2c00..cf541f4 100644 --- a/src/main/java/net/pterodactylus/fcp/highlevel/FcpClient.java +++ b/src/main/java/net/pterodactylus/fcp/highlevel/FcpClient.java @@ -777,7 +777,7 @@ public class FcpClient implements Closeable { @Override @SuppressWarnings("synthetic-access") public void run() throws IOException { - sendMessage(new ListPeerNotes(peer.getIdentity())); + sendMessage(new ListPeerNotes(createIdentifier("list-peer-notes"), peer.getIdentity())); } /**