Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix threading cleanup in performSearch #7672

Merged
merged 5 commits into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve

### Fixed

- we fixed an issue where importing entries would not respect the library mode (BibTeX/biblatex)[#1018](https://github.com/JabRef/jabref/issues/1018)
- We fixed an issue where an exception occured when importing entries from a web search [#7606](https://github.com/JabRef/jabref/issues/7606)
- We fixed an issue where the table column sort order was not properly stored and resulted in unsorted eports [#7524](https://github.com/JabRef/jabref/issues/7524)
- We fixed an issue where the value of the field `school` or `institution` would be printed twice in the HTML Export [forum#2634](https://discourse.jabref.org/t/problem-with-exporting-techreport-phdthesis-mastersthesis-to-html/2634)
- We fixed an issue preventing to connect to a shared database. [#7570](https://github.com/JabRef/jabref/pull/7570)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

import org.jabref.logic.help.HelpFile;
import org.jabref.logic.importer.FetcherException;
import org.jabref.logic.importer.ImportCleanup;
import org.jabref.logic.importer.SearchBasedFetcher;
import org.jabref.model.database.BibDatabaseMode;
import org.jabref.model.entry.BibEntry;

import org.apache.lucene.queryparser.flexible.core.nodes.QueryNode;
Expand Down Expand Up @@ -48,7 +46,6 @@ public Optional<HelpFile> getHelpPage() {

@Override
public List<BibEntry> performSearch(QueryNode luceneQuery) throws FetcherException {
ImportCleanup cleanup = new ImportCleanup(BibDatabaseMode.BIBTEX);
// All entries have to be converted into one format, this is necessary for the format conversion
return fetchers.parallelStream()
.flatMap(searchBasedFetcher -> {
Expand All @@ -60,7 +57,6 @@ public List<BibEntry> performSearch(QueryNode luceneQuery) throws FetcherExcepti
}
})
.limit(maximumNumberOfReturnedResults)
.map(cleanup::doPostCleanup)
tobiasdiez marked this conversation as resolved.
Show resolved Hide resolved
.collect(Collectors.toList());
}
}