nizhikov commented on code in PR #10678:
URL: https://github.com/apache/ignite/pull/10678#discussion_r1182543855


##########
modules/core/src/main/java/org/apache/ignite/internal/management/ChangeTagCommandArg.java:
##########
@@ -15,45 +15,48 @@
  * limitations under the License.
  */
 
-package org.apache.ignite.internal.visor.misc;
+package org.apache.ignite.internal.management;
 
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import org.apache.ignite.internal.dto.IgniteDataTransferObject;
-
-/**
- *
- */
-public class VisorClusterChangeTagTaskArg extends IgniteDataTransferObject {
+import org.apache.ignite.internal.management.api.Argument;
+import org.apache.ignite.internal.management.api.CliConfirmParameter;
+import org.apache.ignite.internal.management.api.Positional;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/** */
+@CliConfirmParameter
+public class ChangeTagCommandArg extends IgniteDataTransferObject {
     /** */
-    private static final long serialVersionUID = 0L;
+    private static final long serialVersionUID = 0;
 
     /** */
-    private String newTag;
-
-    /** */
-    public VisorClusterChangeTagTaskArg() {
-        // No-op.
-    }
-
-    /** */
-    public VisorClusterChangeTagTaskArg(String newTag) {
-        this.newTag = newTag;
-    }
+    @Positional
+    @Argument(javaStyleExample = true)
+    private String newTagValue;
 
     /** {@inheritDoc} */
     @Override protected void writeExternalData(ObjectOutput out) throws 
IOException {
-        out.writeObject(newTag);
+        U.writeString(out, newTagValue);
     }
 
     /** {@inheritDoc} */
     @Override protected void readExternalData(byte protoVer, ObjectInput in) 
throws IOException, ClassNotFoundException {
-        newTag = (String)in.readObject();
+        newTagValue = U.readString(in);
+    }
+
+    /** */
+    public String newTagValue() {
+        return newTagValue;
     }
 
     /** */
-    public String newTag() {
-        return newTag;
+    public void newTagValue(String newTagValue) {
+        if (newTagValue.isEmpty())

Review Comment:
   It's OK to extends the check a bit. Changes to `F.isEmpty`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to