diff --git a/CHANGELOG.md b/CHANGELOG.md index e2a090ea191..a61a78fddcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We fixed an issue where the full-text search results were incomplete. [#8626](https://github.com/JabRef/jabref/issues/8626) - We fixed an issue where search result highlighting was incorrectly highlighting the boolean operators. [#11595](https://github.com/JabRef/jabref/issues/11595) - We fixed an issue where search result highlighting was broken at complex searches. [#8067](https://github.com/JabRef/jabref/issues/8067) +- We fixed an exception when searching for unlinked files. [#11731](https://github.com/JabRef/jabref/issues/11731) - We fixed an issue where two contradicting notifications were shown when cutting an entry in the main table. [#11724](https://github.com/JabRef/jabref/pull/11724) - We fixed an issue where unescaped braces in the arXiv fetcher were not treated. [#11704](https://github.com/JabRef/jabref/issues/11704) diff --git a/src/main/java/org/jabref/gui/util/FileNodeViewModel.java b/src/main/java/org/jabref/gui/util/FileNodeViewModel.java index b4d23c1a140..253ea20a69f 100644 --- a/src/main/java/org/jabref/gui/util/FileNodeViewModel.java +++ b/src/main/java/org/jabref/gui/util/FileNodeViewModel.java @@ -64,7 +64,7 @@ public static String formatDateTime(FileTime fileTime) { */ public String getDisplayText() { if (path.toFile().isDirectory()) { - return "%s (%s %s)".formatted(path.getFileName(), Localization.lang("%0 file(s)", fileCount)); + return "%s (%s)".formatted(path.getFileName(), Localization.lang("%0 file(s)", fileCount)); } return path.getFileName().toString(); } @@ -75,7 +75,7 @@ public String getDisplayText() { */ public String getDisplayTextWithEditDate() { if (path.toFile().isDirectory()) { - return "%s (%s %s)".formatted(path.getFileName(), Localization.lang("%0 file(s)", fileCount)); + return "%s (%s)".formatted(path.getFileName(), Localization.lang("%0 file(s)", fileCount)); } FileTime lastEditedTime = null; try { @@ -83,7 +83,7 @@ public String getDisplayTextWithEditDate() { } catch (IOException e) { LOGGER.error("Could not get last modified time", e); } - return "%s (%s: %s)".formatted(path.getFileName().toString(), Localization.lang("last edited"), formatDateTime(lastEditedTime)); + return "%s (%s: %s)".formatted(path.getFileName(), Localization.lang("last edited"), formatDateTime(lastEditedTime)); } @Override @@ -104,10 +104,9 @@ public boolean equals(Object obj) { if (this == obj) { return true; } - if (!(obj instanceof FileNodeViewModel)) { + if (!(obj instanceof FileNodeViewModel other)) { return false; } - FileNodeViewModel other = (FileNodeViewModel) obj; return Objects.equals(children, other.children) && (fileCount == other.fileCount) && Objects.equals(path, other.path); } }