From feaef5365ce93e4625cb9615ea36072791cbd439 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Sat, 21 Dec 2024 14:47:20 +0100 Subject: [PATCH] Improve variable name --- .../externalfiletypes/ExternalFileTypesTabViewModel.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/jabref/gui/preferences/externalfiletypes/ExternalFileTypesTabViewModel.java b/src/main/java/org/jabref/gui/preferences/externalfiletypes/ExternalFileTypesTabViewModel.java index d3c0a8aaf2b..a228faf6d85 100644 --- a/src/main/java/org/jabref/gui/preferences/externalfiletypes/ExternalFileTypesTabViewModel.java +++ b/src/main/java/org/jabref/gui/preferences/externalfiletypes/ExternalFileTypesTabViewModel.java @@ -83,7 +83,7 @@ public boolean edit(ExternalFileTypeItemViewModel type) { showEditDialog(typeToModify, Localization.lang("Edit file type")); if (type.extensionProperty().get().equals(typeToModify.extensionProperty().get())) { - if (withEmptyValue(typeToModify)) { + if (hasEmptyValue(typeToModify)) { LOGGER.warn("One of the fields is empty or invalid. Not saving."); return false; } @@ -101,7 +101,7 @@ public void remove(ExternalFileTypeItemViewModel type) { } public boolean isValidExternalFileType(ExternalFileTypeItemViewModel item) { - if (withEmptyValue(item)) { + if (hasEmptyValue(item)) { LOGGER.warn("One of the fields is empty or invalid. Not saving."); return false; } @@ -114,7 +114,7 @@ public boolean isValidExternalFileType(ExternalFileTypeItemViewModel item) { return true; } - private boolean withEmptyValue(ExternalFileTypeItemViewModel item) { + private boolean hasEmptyValue(ExternalFileTypeItemViewModel item) { return item.getName().isEmpty() || item.extensionProperty().get().isEmpty() || item.mimetypeProperty().get().isEmpty(); }