Remove clone() for Trigger

This commit is contained in:
Nico Schmitz 2019-03-26 22:42:21 +01:00
parent 7b5c26bbb9
commit dcb57ac11d
2 changed files with 1 additions and 21 deletions

View file

@ -19,7 +19,7 @@ import java.util.List;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
public abstract class Trigger implements Cloneable {
public abstract class Trigger {
public enum Comparator {
IS_LOWER,
@ -139,11 +139,4 @@ public abstract class Trigger implements Cloneable {
return root;
}
@Override
public Trigger clone() throws CloneNotSupportedException {
Trigger t = (Trigger) super.clone();
t.connector = connector; // parent should already be cloned
return t;
}
}

View file

@ -258,17 +258,4 @@ public class TriggerConnector extends Trigger {
return this;
}
@Override
public TriggerConnector clone() throws CloneNotSupportedException {
TriggerConnector tc = (TriggerConnector) super.clone();
tc.list = new ArrayList<>();
for(Trigger t : list) {
tc.list.add(t.clone());
}
if (adapter != null)
tc.adapter = new AutomationFragment.TriggerListAdapter(adapter.getContext(), adapter.getFragmentManager(), adapter.getRootLayout(), tc);
return tc;
}
}