mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
FileDownloader: fixed concurrency problem (EA-95126)
This commit is contained in:
@@ -49,6 +49,7 @@ import javax.swing.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
@@ -149,8 +150,8 @@ public class FileDownloaderImpl implements FileDownloader {
|
||||
@NotNull
|
||||
@Override
|
||||
public List<Pair<File, DownloadableFileDescription>> download(@NotNull final File targetDir) throws IOException {
|
||||
final List<Pair<File, DownloadableFileDescription>> downloadedFiles = new ArrayList<>();
|
||||
final List<Pair<File, DownloadableFileDescription>> existingFiles = new ArrayList<>();
|
||||
List<Pair<File, DownloadableFileDescription>> downloadedFiles = Collections.synchronizedList(new ArrayList<>());
|
||||
List<Pair<File, DownloadableFileDescription>> existingFiles = Collections.synchronizedList(new ArrayList<>());
|
||||
ProgressIndicator parentIndicator = ProgressManager.getInstance().getProgressIndicator();
|
||||
if (parentIndicator == null) {
|
||||
parentIndicator = new EmptyProgressIndicator();
|
||||
|
||||
Reference in New Issue
Block a user