Committed by
Gerrit Code Review
Remove createIntentUpdate() a method under IntentWorker
Because the method is only accessed from IntentWorker Change-Id: Id80a93a7dfdaabc0c78a519a47fd979572d990ef
Showing
1 changed file
with
17 additions
and
17 deletions
... | @@ -284,23 +284,6 @@ public class IntentManager | ... | @@ -284,23 +284,6 @@ public class IntentManager |
284 | } | 284 | } |
285 | } | 285 | } |
286 | 286 | ||
287 | - private IntentProcessPhase createIntentUpdate(IntentData intentData) { | ||
288 | - IntentData current = store.getIntentData(intentData.key()); | ||
289 | - switch (intentData.state()) { | ||
290 | - case INSTALL_REQ: | ||
291 | - return new InstallRequest(processor, intentData, Optional.ofNullable(current)); | ||
292 | - case WITHDRAW_REQ: | ||
293 | - if (current == null || isNullOrEmpty(current.installables())) { | ||
294 | - return new Withdrawn(intentData, WITHDRAWN); | ||
295 | - } else { | ||
296 | - return new WithdrawRequest(processor, intentData, current); | ||
297 | - } | ||
298 | - default: | ||
299 | - // illegal state | ||
300 | - return new CompilingFailed(intentData); | ||
301 | - } | ||
302 | - } | ||
303 | - | ||
304 | private Future<FinalIntentProcessPhase> submitIntentData(IntentData data) { | 287 | private Future<FinalIntentProcessPhase> submitIntentData(IntentData data) { |
305 | return workerExecutor.submit(new IntentWorker(data)); | 288 | return workerExecutor.submit(new IntentWorker(data)); |
306 | } | 289 | } |
... | @@ -400,6 +383,23 @@ public class IntentManager | ... | @@ -400,6 +383,23 @@ public class IntentManager |
400 | } | 383 | } |
401 | return (FinalIntentProcessPhase) previousPhase; | 384 | return (FinalIntentProcessPhase) previousPhase; |
402 | } | 385 | } |
386 | + | ||
387 | + private IntentProcessPhase createIntentUpdate(IntentData intentData) { | ||
388 | + IntentData current = store.getIntentData(intentData.key()); | ||
389 | + switch (intentData.state()) { | ||
390 | + case INSTALL_REQ: | ||
391 | + return new InstallRequest(processor, intentData, Optional.ofNullable(current)); | ||
392 | + case WITHDRAW_REQ: | ||
393 | + if (current == null || isNullOrEmpty(current.installables())) { | ||
394 | + return new Withdrawn(intentData, WITHDRAWN); | ||
395 | + } else { | ||
396 | + return new WithdrawRequest(processor, intentData, current); | ||
397 | + } | ||
398 | + default: | ||
399 | + // illegal state | ||
400 | + return new CompilingFailed(intentData); | ||
401 | + } | ||
402 | + } | ||
403 | } | 403 | } |
404 | 404 | ||
405 | private class InternalBatchDelegate implements IntentBatchDelegate { | 405 | private class InternalBatchDelegate implements IntentBatchDelegate { | ... | ... |
-
Please register or login to post a comment