Ray Milkey
Committed by Gerrit Code Review

Fix a bug in link up/down handling discovered by STC

Change-Id: I8e1257b8ea3592b7695e5a5dded43286f5b29d3b
......@@ -60,7 +60,7 @@ class Compiling implements IntentProcessPhase {
return Optional.of(new Installing(processor, new IntentData(data, compiled), stored));
} catch (IntentException e) {
log.debug("Unable to compile intent {} due to: {}", data.intent(), e);
if (stored.filter(x -> x.installables().isEmpty()).isPresent()) {
if (stored.filter(x -> !x.installables().isEmpty()).isPresent()) {
// removing orphaned flows and deallocating resources
return Optional.of(new Withdrawing(processor, new IntentData(data, stored.get().installables())));
} else {
......