Initial implementation of CORRUPT state (ONOS-1060)

- Added CORRUPT state to state machine and event type
- Simplified phases using new request field
- Improved null-safety by using Optionals

Change-Id: I1d576b719765b5664aef73477ee04593e8acc4fd
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/phase/InstallRequest.java b/core/net/src/main/java/org/onosproject/net/intent/impl/phase/InstallRequest.java
index 9e09788..03f73eb 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/phase/InstallRequest.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/phase/InstallRequest.java
@@ -47,10 +47,6 @@
 
     @Override
     public Optional<IntentProcessPhase> execute() {
-        if (!stored.isPresent() || stored.get().installables() == null || stored.get().installables().isEmpty()) {
-            return Optional.of(new Compiling(processor, data));
-        } else {
-            return Optional.of(new Recompiling(processor, data, stored.get()));
-        }
+        return Optional.of(new Compiling(processor, data, stored));
     }
 }