commit | f0c5a052a581a672425469ed76df2e8e04adfae5 | [log] [tgz] |
---|---|---|
author | Brian O'Connor <bocon@onlab.us> | Mon Apr 27 00:34:53 2015 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Tue Apr 28 20:17:42 2015 +0000 |
tree | a03b02f7cc0f0e69957bdee912e905942ba7185d | |
parent | 3b84c86b7eee1da86e31ce19efc36d0cd2e8f223 [diff] [blame] |
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)); } }