From 0283458de495e8f9f5393b1184c7a670e9851dcc Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Mon, 23 Oct 2017 09:50:35 +0500 Subject: Implement command cloning --- src/org/traccar/model/Command.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/model') diff --git a/src/org/traccar/model/Command.java b/src/org/traccar/model/Command.java index 67134dc7d..09f0f251b 100644 --- a/src/org/traccar/model/Command.java +++ b/src/org/traccar/model/Command.java @@ -20,7 +20,7 @@ import org.traccar.database.QueryIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @JsonIgnoreProperties(ignoreUnknown = true) -public class Command extends Message { +public class Command extends Message implements Cloneable { public static final String TYPE_CUSTOM = "custom"; public static final String TYPE_IDENTIFICATION = "deviceIdentification"; @@ -77,6 +77,11 @@ public class Command extends Message { public static final String KEY_SERVER = "server"; public static final String KEY_PORT = "port"; + @Override + public Command clone() throws CloneNotSupportedException { + return (Command) super.clone(); + } + private boolean textChannel; public boolean getTextChannel() { -- cgit v1.2.3 From 22efd02c8a45963e08e887d402bd4b9161636ddf Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Mon, 23 Oct 2017 11:15:31 +0500 Subject: Fix indentation --- src/org/traccar/model/Command.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/org/traccar/model') diff --git a/src/org/traccar/model/Command.java b/src/org/traccar/model/Command.java index 09f0f251b..16205ede1 100644 --- a/src/org/traccar/model/Command.java +++ b/src/org/traccar/model/Command.java @@ -79,7 +79,7 @@ public class Command extends Message implements Cloneable { @Override public Command clone() throws CloneNotSupportedException { - return (Command) super.clone(); + return (Command) super.clone(); } private boolean textChannel; -- cgit v1.2.3