šŸ—‘ļø Deprecate ListPeerNotes constructor without both identifiers
authorDavid ā€˜Bombe’ Roden <bombe@freenetproject.org>
Thu, 2 Jan 2025 22:08:52 +0000 (23:08 +0100)
committerDavid ā€˜Bombe’ Roden <bombe@freenetproject.org>
Thu, 2 Jan 2025 22:08:52 +0000 (23:08 +0100)
src/main/java/net/pterodactylus/fcp/ListPeerNotes.java
src/main/java/net/pterodactylus/fcp/highlevel/FcpClient.java

index 67de7d5..fdd570e 100644 (file)
@@ -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);
index a7d2c00..cf541f4 100644 (file)
@@ -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()));
                        }
 
                        /**