diff --git a/src/main/java/org/jabref/gui/EntryTypeView.java b/src/main/java/org/jabref/gui/EntryTypeView.java index b82df361511..10a95f3a5d0 100644 --- a/src/main/java/org/jabref/gui/EntryTypeView.java +++ b/src/main/java/org/jabref/gui/EntryTypeView.java @@ -79,7 +79,7 @@ public EntryTypeView(LibraryTab libraryTab, DialogService dialogService, Prefere ControlHelper.setAction(generateButton, this.getDialogPane(), event -> viewModel.runFetcherWorker()); setResultConverter(button -> { - // The buttonType will always be cancel, even if we pressed one of the entry type buttons + // The buttonType will always be "cancel", even if we pressed one of the entry type buttons return type; }); diff --git a/src/main/java/org/jabref/gui/EntryTypeViewModel.java b/src/main/java/org/jabref/gui/EntryTypeViewModel.java index d8221b328e6..c6981fb2e8d 100644 --- a/src/main/java/org/jabref/gui/EntryTypeViewModel.java +++ b/src/main/java/org/jabref/gui/EntryTypeViewModel.java @@ -113,16 +113,14 @@ private class FetcherWorker extends Task> { @Override protected Optional call() throws InterruptedException, FetcherException { - Optional bibEntry = Optional.empty(); - searchingProperty().setValue(true); storeSelectedFetcher(); fetcher = selectedItemProperty().getValue(); searchID = idText.getValue(); - if (!searchID.isEmpty()) { - bibEntry = fetcher.performSearchById(searchID); + if (searchID.isEmpty()) { + return Optional.empty(); } - return bibEntry; + return fetcher.performSearchById(searchID); } } diff --git a/src/main/java/org/jabref/gui/JabRefGUI.java b/src/main/java/org/jabref/gui/JabRefGUI.java index e7ec1aaf010..32bbfddeb51 100644 --- a/src/main/java/org/jabref/gui/JabRefGUI.java +++ b/src/main/java/org/jabref/gui/JabRefGUI.java @@ -66,7 +66,6 @@ public JabRefGUI(Stage mainStage, List databases, boolean isBlank, } private void openWindow(Stage mainStage) { - LOGGER.debug("Initializing frame"); mainFrame.init(); diff --git a/src/main/java/org/jabref/gui/JabRefMain.java b/src/main/java/org/jabref/gui/JabRefMain.java index 2468cb94819..fff12a94bdb 100644 --- a/src/main/java/org/jabref/gui/JabRefMain.java +++ b/src/main/java/org/jabref/gui/JabRefMain.java @@ -139,8 +139,8 @@ private static void applyPreferences(PreferencesService preferences) { // Initialize protected terms loader Globals.protectedTermsLoader = new ProtectedTermsLoader(preferences.getProtectedTermsPreferences()); - // Override used newline character with the one stored in the preferences - // The preferences return the system newline character sequence as default + // Override used newline character with the one stored in the preferences. + // The preferences return the system newline character sequence as default. OS.NEWLINE = preferences.getNewLineSeparator().toString(); }