Skip to content

Commit 437141f

Browse files
committed
chore: Apply OpenRewrite suggestions #12350
1 parent 35e3255 commit 437141f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

jabgui/src/main/java/org/jabref/gui/git/GitStatusViewModel.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818

1919
/**
2020
* ViewModel that holds current Git sync status for the open .bib database.
21-
* 统一维护当前路径绑定的 GitHandler 状态,包括:
22-
* - 是否是 Git 仓库
23-
* - 当前是否被 Git 跟踪
24-
* - 是否存在冲突
25-
* - 当前同步状态(UP_TO_DATEDIVERGED 等)
21+
* It maintains the state of the GitHandler bound to the current file path, including:
22+
* - Whether the current file is inside a Git repository
23+
* - Whether the file is tracked by Git
24+
* - Whether there are unresolved merge conflicts
25+
* - The current sync status (e.g., UP_TO_DATE, DIVERGED, etc.)
2626
*/
2727
public class GitStatusViewModel extends AbstractViewModel {
2828
private final Path currentBibFile;
@@ -45,7 +45,7 @@ public GitStatusViewModel(Path bibFilePath) {
4545
public void updateStatusFromPath(Path fileOrFolderInRepo) {
4646
Optional<GitHandler> maybeHandler = GitHandler.fromAnyPath(fileOrFolderInRepo);
4747

48-
if (!maybeHandler.isPresent()) {
48+
if (maybeHandler.isEmpty()) {
4949
reset();
5050
return;
5151
}

0 commit comments

Comments
 (0)