diff --git a/src/main/java/org/jabref/gui/EntryTypeView.java b/src/main/java/org/jabref/gui/EntryTypeView.java index 36ab61e5a66..25ec99c1d4d 100644 --- a/src/main/java/org/jabref/gui/EntryTypeView.java +++ b/src/main/java/org/jabref/gui/EntryTypeView.java @@ -2,6 +2,7 @@ import java.util.Collection; import java.util.List; +import java.util.Optional; import javafx.application.Platform; import javafx.event.Event; @@ -79,7 +80,7 @@ public EntryTypeView(BasePanel basePanel, DialogService dialogService, JabRefPre EasyBind.subscribe(viewModel.searchSuccesfulProperty(), value -> { if (value) { - setEntryTypeForReturnAndClose(null); + setEntryTypeForReturnAndClose(Optional.empty()); } }); @@ -89,7 +90,7 @@ private void addEntriesToPane(FlowPane pane, Collection for (BibEntryType entryType : entries) { Button entryButton = new Button(entryType.getType().getDisplayName()); entryButton.setUserData(entryType); - entryButton.setOnAction(event -> setEntryTypeForReturnAndClose(entryType)); + entryButton.setOnAction(event -> setEntryTypeForReturnAndClose(Optional.of(entryType))); pane.getChildren().add(entryButton); } } @@ -162,8 +163,8 @@ private void focusTextField(Event event) { idTextField.selectAll(); } - private void setEntryTypeForReturnAndClose(BibEntryType entryType) { - type = entryType.getType(); + private void setEntryTypeForReturnAndClose(Optional entryType) { + type = entryType.map(BibEntryType::getType).orElse(null); viewModel.stopFetching(); this.close(); } diff --git a/src/main/resources/csl-locales b/src/main/resources/csl-locales index e89e6b08b5c..29ed2ff4328 160000 --- a/src/main/resources/csl-locales +++ b/src/main/resources/csl-locales @@ -1 +1 @@ -Subproject commit e89e6b08b5c621a414fc7114f2129efac5f8c7d5 +Subproject commit 29ed2ff43284f726f9f583981650a86ffb9b236f diff --git a/src/main/resources/csl-styles b/src/main/resources/csl-styles index 7c8f108ce4f..6ed87f55fd7 160000 --- a/src/main/resources/csl-styles +++ b/src/main/resources/csl-styles @@ -1 +1 @@ -Subproject commit 7c8f108ce4f855e405486dff83a89ffe2ccda671 +Subproject commit 6ed87f55fd75fcecbf8f6b8a96d5edd0c935702e