Skip to content

Commit

Permalink
Fix code-style suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
k3KAW8Pnf7mkmdSMPHz27 committed Jan 23, 2022
1 parent 12494db commit 6414f53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.jabref.gui.fieldeditors;

import java.util.stream.Collectors;

import javafx.beans.binding.Bindings;
import javafx.fxml.FXML;
import javafx.scene.Parent;
Expand Down Expand Up @@ -42,7 +40,7 @@ public LinkedEntriesEditor(Field field, BibDatabaseContext databaseContext, Sugg
.withText(ParsedEntryLink::getKey);
chipView.getAutoCompletePopup().setSuggestionsCellFactory(autoCompletionItemFactory);
chipView.getAutoCompletePopup().setCellLimit(5);
chipView.getSuggestions().addAll(suggestionProvider.getPossibleSuggestions().stream().map(ParsedEntryLink::new).collect(Collectors.toList()));
chipView.getSuggestions().addAll(suggestionProvider.getPossibleSuggestions().stream().map(ParsedEntryLink::new).toList());

chipView.setChipFactory((view, item) -> {
JFXChip<ParsedEntryLink> chip = new JFXDefaultChip<>(view, item);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ public StringConverter<ParsedEntryLink> getStringConverter() {

@Override
public String toString(ParsedEntryLink linkedEntry) {
if (linkedEntry == null) {
return "";
}
return linkedEntry.getKey();
return linkedEntry == null ? "" : linkedEntry.getKey();
}

@Override
Expand Down

0 comments on commit 6414f53

Please sign in to comment.