Sho SHIMIZU
Committed by Brian O'Connor

Ensure a CompletedIntentUpdate subclass is the final state

Change-Id: Icecf8a45fad7cb80f3953dcfc081c344d3fa0adb
......@@ -22,7 +22,7 @@ import static org.onosproject.net.intent.IntentState.FAILED;
/**
* Represents a phase where the compile has failed.
*/
class CompilingFailed implements CompletedIntentUpdate {
class CompilingFailed extends CompletedIntentUpdate {
private final IntentData intentData;
......
......@@ -22,12 +22,12 @@ import java.util.Optional;
/**
* Represents a completed phase of processing an intent.
*/
interface CompletedIntentUpdate extends IntentUpdate {
abstract class CompletedIntentUpdate implements IntentUpdate {
@Override
default Optional<IntentUpdate> execute() {
public final Optional<IntentUpdate> execute() {
return Optional.empty();
}
IntentData data();
public abstract IntentData data();
}
......
......@@ -20,7 +20,7 @@ import org.onosproject.net.intent.IntentData;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.onosproject.net.intent.IntentState.INSTALLING;
class Installed implements CompletedIntentUpdate {
class Installed extends CompletedIntentUpdate {
private final IntentData intentData;
......
......@@ -20,7 +20,7 @@ import org.onosproject.net.intent.IntentData;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.onosproject.net.intent.IntentState.FAILED;
class InstallingFailed implements CompletedIntentUpdate {
class InstallingFailed extends CompletedIntentUpdate {
private final IntentData intentData;
......
......@@ -20,7 +20,7 @@ import org.onosproject.net.intent.IntentData;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.onosproject.net.intent.IntentState.WITHDRAWING;
class Withdrawn implements CompletedIntentUpdate {
class Withdrawn extends CompletedIntentUpdate {
private final IntentData intentData;
......