You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2021/06/11 06:21:58 UTC

[isis] 08/09: ISIS-2726: small simplifications for CommandExecutorServiceDefault

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch ISIS-2726
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 7cec66c6799fad1c64a81c1690411527957f0fa5
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jun 11 06:42:09 2021 +0100

    ISIS-2726: small simplifications for CommandExecutorServiceDefault
---
 .../runtimeservices/command/CommandExecutorServiceDefault.java     | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/command/CommandExecutorServiceDefault.java b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/command/CommandExecutorServiceDefault.java
index 3de5535..50a6be6 100644
--- a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/command/CommandExecutorServiceDefault.java
+++ b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/command/CommandExecutorServiceDefault.java
@@ -99,7 +99,6 @@ public class CommandExecutorServiceDefault implements CommandExecutorService {
     @Inject final ClockService clockService;
     @Inject final TransactionService transactionService;
     @Inject final InteractionLayerTracker iInteractionLayerTracker;
-    @Inject final Provider<InteractionProvider> interactionProviderProvider;
 
     @Inject @Getter final InteractionService interactionService;
     @Inject @Getter final SpecificationLoader specificationLoader;
@@ -139,7 +138,7 @@ public class CommandExecutorServiceDefault implements CommandExecutorService {
             final CommandDto dto,
             final CommandOutcomeHandler commandUpdater) {
 
-        val interaction = interactionProviderProvider.get().currentInteractionElseFail();
+        val interaction = iInteractionLayerTracker.currentInteractionElseFail();
         val command = interaction.getCommand();
         if(command.getCommandDto() != dto) {
             command.updater().setCommandDto(dto);
@@ -165,7 +164,7 @@ public class CommandExecutorServiceDefault implements CommandExecutorService {
     private void copyStartedAtFromInteractionExecution(
             final CommandOutcomeHandler commandOutcomeHandler) {
 
-        val interaction = interactionProviderProvider.get().currentInteractionElseFail();
+        val interaction = iInteractionLayerTracker.currentInteractionElseFail();
         val currentExecution = interaction.getCurrentExecution();
 
         val startedAt = currentExecution != null
@@ -271,7 +270,7 @@ public class CommandExecutorServiceDefault implements CommandExecutorService {
         // there was an exception when performing the action invocation/property
         // edit.  We therefore need to guard that case.
         //
-        val interaction = interactionProviderProvider.get().currentInteractionElseFail();
+        val interaction = iInteractionLayerTracker.currentInteractionElseFail();
 
         final Execution<?, ?> priorExecution = interaction.getPriorExecution();
         if(priorExecution != null) {