Skip to content

Commit

Permalink
Improve variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Dec 21, 2024
1 parent 14bc706 commit feaef53
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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();
}

Expand Down

0 comments on commit feaef53

Please sign in to comment.