This change solves the problem when the NetconfDataTreeService.lock()
returns an immutable list of futures, and the NetconfRestconfTransaction
wrapper can't change items on the list.
JIRA: NETCONF-705
Change-Id: Ie98f23382660683e269d3c1cdad6419be72545e5
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
import com.google.common.util.concurrent.FluentFuture;
import com.google.common.util.concurrent.ListenableFuture;
+import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import org.eclipse.jdt.annotation.NonNull;
NetconfRestconfTransaction(final NetconfDataTreeService netconfService) {
this.netconfService = requireNonNull(netconfService);
- this.resultsFutures = netconfService.lock();
+ this.resultsFutures = new ArrayList<>(netconfService.lock());
}
@Override