diff --git a/src/main/java/org/jabref/gui/externalfiles/FindFullTextAction.java b/src/main/java/org/jabref/gui/externalfiles/FindFullTextAction.java index 098175d865e..72c2bedd70d 100644 --- a/src/main/java/org/jabref/gui/externalfiles/FindFullTextAction.java +++ b/src/main/java/org/jabref/gui/externalfiles/FindFullTextAction.java @@ -69,14 +69,14 @@ public void execute() { } } - Task, BibEntry>> findFullTextsTask = new Task, BibEntry>>() { + Task>> findFullTextsTask = new Task>>() { @Override - protected Map, BibEntry> call() { - Map, BibEntry> downloads = new ConcurrentHashMap<>(); + protected Map> call() { + Map> downloads = new ConcurrentHashMap<>(); int count = 0; for (BibEntry entry : basePanel.getSelectedEntries()) { FulltextFetchers fetchers = new FulltextFetchers(Globals.prefs.getImportFormatPreferences()); - downloads.put(fetchers.findFullTextPDF(entry), entry); + downloads.put(entry, fetchers.findFullTextPDF(entry)); updateProgress(++count, basePanel.getSelectedEntries().size()); } return downloads; @@ -93,10 +93,10 @@ protected Map, BibEntry> call() { Globals.TASK_EXECUTOR.execute(findFullTextsTask); } - private void downloadFullTexts(Map, BibEntry> downloads) { - for (Map.Entry, BibEntry> download : downloads.entrySet()) { - BibEntry entry = download.getValue(); - Optional result = download.getKey(); + private void downloadFullTexts(Map> downloads) { + for (Map.Entry> download : downloads.entrySet()) { + BibEntry entry = download.getKey(); + Optional result = download.getValue(); if (result.isPresent()) { Optional dir = basePanel.getBibDatabaseContext().getFirstExistingFileDir(Globals.prefs.getFilePreferences());