šŸ—‘ļø Deprecate GetConfig constructor without identifier
authorDavid ā€˜Bombe’ Roden <bombe@freenetproject.org>
Wed, 1 Jan 2025 19:24:22 +0000 (20:24 +0100)
committerDavid ā€˜Bombe’ Roden <bombe@freenetproject.org>
Wed, 1 Jan 2025 20:06:20 +0000 (21:06 +0100)
src/main/java/net/pterodactylus/fcp/GetConfig.java

index 2f7d2e6..6e4ab0a 100644 (file)
@@ -27,14 +27,19 @@ public class GetConfig extends FcpMessage {
 
        /**
         * Creates a new ā€œGetConfigā€ command.
+        *
+        * @deprecated Use {@link #GetConfig(String)} instead
         */
+       @Deprecated
        public GetConfig() {
-               super("GetConfig");
+               this(null);
        }
 
        public GetConfig(String identifer) {
-               this();
-               setField("Identifier", identifer);
+               super("GetConfig");
+               if (identifer != null) {
+                       setField("Identifier", identifer);
+               }
        }
 
        /**