Remove createIntentUpdate() a method under IntentWorker
Because the method is only accessed from IntentWorker
Change-Id: Id80a93a7dfdaabc0c78a519a47fd979572d990ef
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
index 3699df6..8f808e4 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
@@ -284,23 +284,6 @@
}
}
- private IntentProcessPhase createIntentUpdate(IntentData intentData) {
- IntentData current = store.getIntentData(intentData.key());
- switch (intentData.state()) {
- case INSTALL_REQ:
- return new InstallRequest(processor, intentData, Optional.ofNullable(current));
- case WITHDRAW_REQ:
- if (current == null || isNullOrEmpty(current.installables())) {
- return new Withdrawn(intentData, WITHDRAWN);
- } else {
- return new WithdrawRequest(processor, intentData, current);
- }
- default:
- // illegal state
- return new CompilingFailed(intentData);
- }
- }
-
private Future<FinalIntentProcessPhase> submitIntentData(IntentData data) {
return workerExecutor.submit(new IntentWorker(data));
}
@@ -400,6 +383,23 @@
}
return (FinalIntentProcessPhase) previousPhase;
}
+
+ private IntentProcessPhase createIntentUpdate(IntentData intentData) {
+ IntentData current = store.getIntentData(intentData.key());
+ switch (intentData.state()) {
+ case INSTALL_REQ:
+ return new InstallRequest(processor, intentData, Optional.ofNullable(current));
+ case WITHDRAW_REQ:
+ if (current == null || isNullOrEmpty(current.installables())) {
+ return new Withdrawn(intentData, WITHDRAWN);
+ } else {
+ return new WithdrawRequest(processor, intentData, current);
+ }
+ default:
+ // illegal state
+ return new CompilingFailed(intentData);
+ }
+ }
}
private class InternalBatchDelegate implements IntentBatchDelegate {