@@ -619,7 +619,7 @@ public boolean isRunning() {
619619
620620 try {
621621 if (getActionDescription ().getIntermediary ()) {
622- for (final RemoteAction impactedRemoteAction : impactedRemoteActions . stream (). toList ( )) {
622+ for (final RemoteAction impactedRemoteAction : new ArrayList <>( impactedRemoteActions )) {
623623 if (impactedRemoteAction .isRunning ()) {
624624 return true ;
625625 }
@@ -650,7 +650,7 @@ public boolean isDone() {
650650
651651 try {
652652 if (getActionDescription ().getIntermediary ()) {
653- for (final RemoteAction impactedRemoteAction : impactedRemoteActions . stream (). toList ( )) {
653+ for (final RemoteAction impactedRemoteAction : new ArrayList <>( impactedRemoteActions )) {
654654 if (!impactedRemoteAction .isDone ()) {
655655 return false ;
656656 }
@@ -854,7 +854,7 @@ private void cleanup() {
854854
855855 // cleanup synchronisation and observation tasks
856856 actionDescriptionObservable .reset ();
857- for (RemoteAction impactedRemoteAction : impactedRemoteActions . stream (). toList ( )) {
857+ for (RemoteAction impactedRemoteAction : new ArrayList <>( impactedRemoteActions )) {
858858 impactedRemoteAction .removeActionDescriptionObserver (impactActionObserver );
859859 }
860860 impactedRemoteActions .clear ();
@@ -955,7 +955,7 @@ public void waitUntilDone() throws CouldNotPerformException, InterruptedExceptio
955955
956956 try {
957957 if (getActionDescription ().getIntermediary ()) {
958- for (final RemoteAction impactedRemoteAction : impactedRemoteActions . stream (). toList ( )) {
958+ for (final RemoteAction impactedRemoteAction : new ArrayList <>( impactedRemoteActions )) {
959959 impactedRemoteAction .waitUntilDone ();
960960 }
961961 return ;
@@ -1006,7 +1006,7 @@ public void waitForActionState(final ActionState.State actionState, final long t
10061006
10071007 try {
10081008 if (actionDescription .getIntermediary ()) {
1009- for (final RemoteAction impactedRemoteAction : impactedRemoteActions . stream (). toList ( )) {
1009+ for (final RemoteAction impactedRemoteAction : new ArrayList <>( impactedRemoteActions )) {
10101010 impactedRemoteAction .waitForActionState (actionState , timeSplit .getTime (), timeSplit .getTimeUnit ());
10111011 }
10121012 return ;
@@ -1093,7 +1093,7 @@ public void waitForRegistration() throws CouldNotPerformException, InterruptedEx
10931093 }
10941094
10951095 if (getActionDescription ().getIntermediary ()) {
1096- for (final RemoteAction impactedRemoteAction : impactedRemoteActions . stream (). toList ( )) {
1096+ for (final RemoteAction impactedRemoteAction : new ArrayList <>( impactedRemoteActions )) {
10971097 impactedRemoteAction .waitForRegistration ();
10981098 }
10991099 }
@@ -1132,7 +1132,7 @@ public void waitForRegistration(final long timeout, final TimeUnit timeUnit) thr
11321132 }
11331133
11341134 if (getActionDescription ().getIntermediary ()) {
1135- for (final RemoteAction impactedRemoteAction : impactedRemoteActions . stream (). toList ( )) {
1135+ for (final RemoteAction impactedRemoteAction : new ArrayList <>( impactedRemoteActions )) {
11361136 impactedRemoteAction .waitForRegistration (timeSplit .getTime (), timeSplit .getTimeUnit ());
11371137 }
11381138 }
@@ -1149,7 +1149,7 @@ public boolean isRegistrationDone() {
11491149 }
11501150
11511151 if (actionDescription .getIntermediary ()) {
1152- for (final RemoteAction impactedRemoteAction : impactedRemoteActions . stream (). toList ( )) {
1152+ for (final RemoteAction impactedRemoteAction : new ArrayList <>( impactedRemoteActions )) {
11531153 if (!impactedRemoteAction .isRegistrationDone ()) {
11541154 return false ;
11551155 }
0 commit comments