Skip to content

Improve security and prevent shell injection for push2applications#15628

Merged
Siedlerchr merged 23 commits into
mainfrom
fixSecurityIssues
May 3, 2026
Merged

Improve security and prevent shell injection for push2applications#15628
Siedlerchr merged 23 commits into
mainfrom
fixSecurityIssues

Conversation

@Siedlerchr

@Siedlerchr Siedlerchr commented Apr 27, 2026

Copy link
Copy Markdown
Member

Related issues and pull requests

Fix some security issues

  • Secure Push2Applications and improve error handling and one FXthread issue

  • Secure CAYW

PR Description

Steps to test

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)
  • I added JUnit tests for changes (if applicable)
  • [.] I added screenshots in the PR description (if change is visible to the user)
  • [.] I added a screenshot in the PR description showing a library with a single entry with me as author and as title the issue number
  • I described the change in CHANGELOG.md in a way that can be understood by the average user (if change is visible to the user)
  • [.] I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Prevent shell injection vulnerabilities in push-to-application implementations

🐞 Bug fix ✨ Enhancement

Grey Divider

Walkthroughs

Description
• Prevent shell injection vulnerabilities across push-to-application implementations
  - Replaced shell command concatenation with ProcessBuilder argument arrays
  - Added input validation for citation command prefixes and CAYW command parameters
  - Removed unsafe shell metacharacter escaping patterns
• Improve error handling and user feedback in push operations
  - Added detailed error notifications with actionable guidance for users
  - Enhanced error detection for connection failures and missing executables
  - Implemented proper process exit code checking
• Refactor command execution to use ProcessBuilder safely
  - Converted Runtime.exec() calls to ProcessBuilder for better argument handling
  - Fixed macOS osascript invocation to pass arguments safely
  - Removed shell wrapper invocations (sh -c, cmd.exe /c) where possible
• Add thread-safety for GUI error notifications in push operations
  - Wrapped DialogService calls with UiTaskExecutor for JavaFX thread safety
Diagram
flowchart LR
  A["Shell Injection Risks"] -->|"Replace with ProcessBuilder"| B["Safe Argument Handling"]
  A -->|"Add Input Validation"| C["Command Parameter Validation"]
  D["GUI Push Classes"] -->|"Add Thread Safety"| E["UiTaskExecutor Wrapper"]
  F["Push Logic Classes"] -->|"Improve Error Handling"| G["Detailed Error Notifications"]
  H["CAYW Resource"] -->|"Validate Command Parameter"| I["Regex Pattern Matching"]
  B --> J["Secure Implementation"]
  C --> J
  E --> J
  G --> J
  I --> J
Loading

Grey Divider

File Changes

1. jabgui/src/main/java/org/jabref/gui/push/GuiPushToEmacs.java Error handling +2/-1

Add thread-safe error notification wrapper

jabgui/src/main/java/org/jabref/gui/push/GuiPushToEmacs.java


2. jabgui/src/main/java/org/jabref/gui/push/GuiPushToLyx.java Error handling +2/-1

Add thread-safe error notification wrapper

jabgui/src/main/java/org/jabref/gui/push/GuiPushToLyx.java


3. jabgui/src/main/java/org/jabref/gui/push/GuiPushToSublimeText.java Error handling +2/-1

Add thread-safe error notification wrapper

jabgui/src/main/java/org/jabref/gui/push/GuiPushToSublimeText.java


View more (19)
4. jabgui/src/main/java/org/jabref/gui/push/GuiPushToTeXstudio.java Error handling +2/-1

Add thread-safe error notification wrapper

jabgui/src/main/java/org/jabref/gui/push/GuiPushToTeXstudio.java


5. jabgui/src/main/java/org/jabref/gui/push/GuiPushToTeXworks.java Error handling +2/-1

Add thread-safe error notification wrapper

jabgui/src/main/java/org/jabref/gui/push/GuiPushToTeXworks.java


6. jabgui/src/main/java/org/jabref/gui/push/GuiPushToTexShop.java Error handling +2/-1

Add thread-safe error notification wrapper

jabgui/src/main/java/org/jabref/gui/push/GuiPushToTexShop.java


7. jabgui/src/main/java/org/jabref/gui/push/GuiPushToTexmaker.java Error handling +2/-1

Add thread-safe error notification wrapper

jabgui/src/main/java/org/jabref/gui/push/GuiPushToTexmaker.java


8. jabgui/src/main/java/org/jabref/gui/push/GuiPushToVScode.java Error handling +2/-1

Add thread-safe error notification wrapper

jabgui/src/main/java/org/jabref/gui/push/GuiPushToVScode.java


9. jabgui/src/main/java/org/jabref/gui/push/GuiPushToVim.java Error handling +2/-1

Add thread-safe error notification wrapper

jabgui/src/main/java/org/jabref/gui/push/GuiPushToVim.java


10. jabgui/src/main/java/org/jabref/gui/push/GuiPushToWinEdt.java Error handling +2/-1

Add thread-safe error notification wrapper

jabgui/src/main/java/org/jabref/gui/push/GuiPushToWinEdt.java


11. jablib/src/main/java/org/jabref/logic/push/AbstractPushToApplication.java 🐞 Bug fix +26/-18

Prevent shell injection and improve error handling

jablib/src/main/java/org/jabref/logic/push/AbstractPushToApplication.java


12. jablib/src/main/java/org/jabref/logic/push/CitationCommandString.java 🐞 Bug fix +6/-0

Add validation for citation command prefix format

jablib/src/main/java/org/jabref/logic/push/CitationCommandString.java


13. jablib/src/main/java/org/jabref/logic/push/PushToEmacs.java 🐞 Bug fix +22/-9

Replace Runtime.exec with ProcessBuilder and add error notifications

jablib/src/main/java/org/jabref/logic/push/PushToEmacs.java


14. jablib/src/main/java/org/jabref/logic/push/PushToLyx.java 🐞 Bug fix +3/-2

Fix null pointer handling for command path

jablib/src/main/java/org/jabref/logic/push/PushToLyx.java


15. jablib/src/main/java/org/jabref/logic/push/PushToSublimeText.java 🐞 Bug fix +47/-12

Prevent shell injection by removing shell wrapper invocation

jablib/src/main/java/org/jabref/logic/push/PushToSublimeText.java


16. jablib/src/main/java/org/jabref/logic/push/PushToTeXworks.java 🐞 Bug fix +1/-1

Fix command-line argument formatting for position parameter

jablib/src/main/java/org/jabref/logic/push/PushToTeXworks.java


17. jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java 🐞 Bug fix +52/-27

Refactor to use osascript with safe argument passing

jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java


18. jablib/src/main/java/org/jabref/logic/push/PushToVim.java 🐞 Bug fix +26/-14

Replace Runtime.exec with ProcessBuilder and improve error handling

jablib/src/main/java/org/jabref/logic/push/PushToVim.java


19. jablib/src/main/java/org/jabref/logic/push/PushToWinEdt.java ✨ Enhancement +4/-1

Improve string escaping for WinEdt macro invocation

jablib/src/main/java/org/jabref/logic/push/PushToWinEdt.java


20. jablib/src/test/java/org/jabref/logic/push/PushToSublimeTextTest.java 🧪 Tests +45/-0

Add test for shell injection prevention in Sublime Text

jablib/src/test/java/org/jabref/logic/push/PushToSublimeTextTest.java


21. jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java 🐞 Bug fix +10/-1

Add validation for CAYW command parameter to prevent injection

jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java


22. jabsrv/src/test/java/org/jabref/http/server/cayw/CAYWResourceTest.java 🧪 Tests +14/-0

Add test for malicious CAYW command parameter rejection

jabsrv/src/test/java/org/jabref/http/server/cayw/CAYWResourceTest.java


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (4) 📎 Requirement gaps (0)

Grey Divider


Action required

1. prefix.matches() used directly📘 Rule violation ➹ Performance
Description
The new CitationCommandString constructor validates prefix using String.matches, which
recompiles the regex each call and violates the requirement to use a compiled Pattern. This can
add avoidable overhead if citation commands are constructed frequently.
Code

jablib/src/main/java/org/jabref/logic/push/CitationCommandString.java[R12-16]

+    public CitationCommandString {
+        if (!prefix.matches("[a-zA-Z\\\\*]+\\{?")) {
+            LOGGER.warn("Invalid prefix: {}", prefix);
+        }
+    }
Evidence
PR Compliance ID 9 forbids introducing String.matches with regex literals in new/modified code.
The added constructor uses prefix.matches("[a-zA-Z\\\\*]+\\{?") for validation.

AGENTS.md
jablib/src/main/java/org/jabref/logic/push/CitationCommandString.java[12-16]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`CitationCommandString` uses `String.matches(...)` for regex validation, which recompiles the pattern each time.
## Issue Context
Compliance requires compiled `Pattern` reuse instead of repeated `String.matches`.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/push/CitationCommandString.java[12-16]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. command.matches() used directly📘 Rule violation ➹ Performance
Description
The new CAYW request validation uses String.matches, which recompiles the regex for every request
and violates the compiled-pattern requirement. This is a hot-path HTTP endpoint and should use a
precompiled Pattern.
Code

jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java[R74-80]

+        String command = queryParams.getCommand().orElse("autocite");
+        if (!command.matches("[a-zA-Z*]+")) {
+            LOGGER.warn("Blocked CAYW request with malicious command: {}", command);
+            return Response.status(Response.Status.BAD_REQUEST)
+                           .entity("The 'command' parameter contains invalid characters. Only alphanumeric characters and '*' are allowed.")
+                           .build();
+        }
Evidence
PR Compliance ID 9 disallows introducing String.matches with regex literals. The added validation
uses command.matches("[a-zA-Z*]+") to filter the request parameter.

AGENTS.md
jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java[74-80]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
CAYW command validation uses `String.matches`, recompiling the regex for each request.
## Issue Context
Compliance requires using `Pattern.compile(...)` once and reusing it.
## Fix Focus Areas
- jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java[74-80]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. commandPath concatenated in message📘 Rule violation ⚙ Maintainability
Description
The error notification message builds a localized string via concatenation around commandPath
instead of using localization placeholders. This makes translations harder and violates the
localization placeholder requirement.
Code

jablib/src/main/java/org/jabref/logic/push/AbstractPushToApplication.java[R108-111]

Localization.lang("Error pushing entries"),
-                    Localization.lang("Could not call executable") + " '" + commandPath + "'.");
+                    Localization.lang("Could not call executable") + " '" + commandPath + "'.\n" +
+                            Localization.lang("Please check the path in the preferences.") + "\n" +
+                            (OS.OS_X ? Localization.lang("On macOS, you can use the command-line binary.") : ""));
Evidence
PR Compliance ID 21 requires variable content to be inserted via localization placeholders rather
than concatenation. The new message uses `Localization.lang("Could not call executable") + " '" +
commandPath + "'." ...`.

AGENTS.md
jablib/src/main/java/org/jabref/logic/push/AbstractPushToApplication.java[108-111]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A localized message is concatenated with `commandPath` instead of using `%0` placeholders.
## Issue Context
Compliance requires placeholder-based localization for variable content.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/push/AbstractPushToApplication.java[108-111]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (3)
4. TeXShop text has exclamation 📘 Rule violation ⚙ Maintainability
Description
A new user-facing localized string ends with an exclamation mark, which violates the UI text style
rules. This introduces inconsistent tone across UI messages.
Code

jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java[R45-47]

+            if (!OS.OS_X) {
+                sendErrorNotification(Localization.lang("Push to application"), Localization.lang("Pushing citations to TeXShop is only possible on macOS!"));
+                return;
Evidence
PR Compliance ID 20 forbids exclamation marks in UI text. The new TeXShop warning uses
Localization.lang("Pushing citations to TeXShop is only possible on macOS!").

AGENTS.md
jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java[45-47]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A localized UI message ends with `!`, which is disallowed by UI text style rules.
## Issue Context
UI text should be sentence case and avoid exclamation marks.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java[45-47]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Test triggers external process 📘 Rule violation ☼ Reliability
Description
The new unit test calls pushEntries(...), which will attempt to start the real /usr/bin/subl
process and makes the test environment-dependent and flaky. Tests should be deterministic and not
execute external processes.
Code

jablib/src/test/java/org/jabref/logic/push/PushToSublimeTextTest.java[R34-41]

+    void getCommandLineEscapingUnix() {
+        CitationCommandString maliciousCommand = new CitationCommandString("\\cite{'; touch /tmp/pwned; #", ",", "}");
+        when(preferences.getCiteCommand()).thenReturn(maliciousCommand);
+
+        pushToSublimeText.pushEntries(java.util.List.of());
+
+        String[] commandLine = pushToSublimeText.getCommandLine("key");
+
Evidence
PR Compliance ID 27 requires tests to be deterministic/fast and not introduce nondeterminism. The
test invokes pushToSublimeText.pushEntries(...), which runs a ProcessBuilder in production code
and may fail depending on OS and installed binaries.

AGENTS.md
jablib/src/test/java/org/jabref/logic/push/PushToSublimeTextTest.java[34-41]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The test calls `pushEntries`, which may spawn an external process and makes the test flaky across environments.
## Issue Context
The test’s intent is to validate command-line construction/escaping; it can assert on `getCommandLine(...)` output directly without executing anything.
## Fix Focus Areas
- jablib/src/test/java/org/jabref/logic/push/PushToSublimeTextTest.java[34-41]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. Silent push failure🐞 Bug ≡ Correctness
Description
PushToSublimeText and PushToTexShop set couldNotPush on non-zero exit but only show an error when
stderr is non-empty, and then suppress super.onOperationCompleted() when couldNotPush is true. This
creates a silent failure path with neither success nor error notification.
Code

jablib/src/main/java/org/jabref/logic/push/PushToSublimeText.java[R74-103]

+            process.waitFor();
+            if (process.exitValue() != 0) {
+                couldNotPush = true;
+                String error = errorStringBuilder.toString().trim();
+                if (!error.isEmpty()) {
+                    sendErrorNotification(Localization.lang("Error pushing entries"),
+                            Localization.lang("Could not push to a running %0 server.", getDisplayName()) + " " + error);
+                }
+            }
+        } catch (IOException | InterruptedException excep) {
LOGGER.warn("Error: Could not call executable '{}'", commandPath, excep);
couldNotCall = true;
+
+            if (excep instanceof IOException) {
+                sendErrorNotification(Localization.lang("Error pushing entries"),
+                        Localization.lang("Could not call executable '%0'.", commandPath) + "\n" +
+                                Localization.lang("Please check the path in the preferences.") + "\n" +
+                                (OS.OS_X ? Localization.lang("On macOS, you can use the command-line binary (e.g., /usr/local/bin/subl).") + "\n" +
+                                        Localization.lang("To create it, run: %0", "sudo ln -s /Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl") : ""));
+            }
+        }
+    }
+
+    @Override
+    public void onOperationCompleted() {
+        if (couldNotPush) {
+            // Detailed error notification might have been sent already in pushEntries
+        } else {
+            super.onOperationCompleted();
}
Evidence
Both implementations set couldNotPush = true when the process exit code is non-zero, but only call
sendErrorNotification if captured stderr is non-empty. Their overridden onOperationCompleted()
does nothing when couldNotPush is true, preventing the default generic error handling in
AbstractPushToApplication from running.

jablib/src/main/java/org/jabref/logic/push/PushToSublimeText.java[74-104]
jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java[71-100]
jablib/src/main/java/org/jabref/logic/push/AbstractPushToApplication.java[101-119]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
For Sublime Text and TeXShop, a non-zero process exit can lead to no user-visible message.
### Issue Context
- `pushEntries()` sets `couldNotPush = true` on `exitValue() != 0`.
- It only calls `sendErrorNotification(...)` when `stderr` text is non-empty.
- `onOperationCompleted()` suppresses `super.onOperationCompleted()` when `couldNotPush` is true.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/push/PushToSublimeText.java[74-104]
- jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java[71-100]
### Suggested fix
Make sure *some* notification is shown whenever `exitValue() != 0`:
- If captured `stderr` is empty, still call `sendErrorNotification(...)` with a generic message, OR
- Track whether a detailed error was already sent (e.g., `boolean detailedErrorShown`) and in `onOperationCompleted()` call `super.onOperationCompleted()` when `couldNotPush` is true but no detailed error was shown.
Also consider ensuring stderr capture completes before deciding it is empty (e.g., join gobbler tasks or read stderr synchronously after process exit).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

7. Hardcoded CAYW error message 📘 Rule violation ⚙ Maintainability
Description
The newly added HTTP error response body is a hardcoded user-facing string instead of using the
project localization mechanism. This reduces translatability and consistency of validation/integrity
messaging.
Code

jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java[R76-79]

+            LOGGER.warn("Blocked CAYW request with malicious command: {}", command);
+            return Response.status(Response.Status.BAD_REQUEST)
+                           .entity("The 'command' parameter contains invalid characters. Only alphanumeric characters and '*' are allowed.")
+                           .build();
Evidence
PR Compliance ID 34 requires user-facing validation/integrity messages to use localization
keys/mechanisms. The new response uses a hardcoded English .entity(...) string.

jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java[76-79]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The CAYW BAD_REQUEST response body is a hardcoded string rather than using localization.
## Issue Context
Compliance requires localized user-facing validation/integrity messages.
## Fix Focus Areas
- jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java[76-79]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


8. AppleScript built with concatenation 📘 Rule violation ⚙ Maintainability
Description
The new multi-line AppleScript string is built via "...\n" + ... concatenation instead of using a
Java text block. This violates the modern Java style requirement for multi-line string constants.
Code

jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java[R50-56]

+            // We use osascript to send the citation to TeXShop.
+            // Using separate arguments for ProcessBuilder avoids shell injection.
+            String script = "tell application \"TeXShop\"\n" +
+                    "activate\n" +
+                    "set TheString to item 1 of arguments\n" +
+                    "set content of selection of front document to TheString\n" +
+                    "end tell";
Evidence
PR Compliance ID 2 requires preferring text blocks for multiline string constants in new/modified
code. The new script is constructed through multiple string concatenations with \n.

AGENTS.md
jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java[50-56]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A multiline constant is constructed with `"...\n" + ...` instead of a Java text block.
## Issue Context
The project prefers modern Java idioms such as text blocks for multiline strings.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java[50-56]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


9. Empty command name shown 🐞 Bug ≡ Correctness
Description
AbstractPushToApplication.getCommandName now returns an empty string, but the GUI settings code only
treats null as “no separate command name”. This causes labels like “Path to <app> ():” for most push
targets.
Code

jablib/src/main/java/org/jabref/logic/push/AbstractPushToApplication.java[R154-155]

public String getCommandName() {
-        return null;
+        return "";
Evidence
The base implementation now returns "" rather than null, while the GUI settings UI uses a null check
to decide whether to render parentheses with the command name, so an empty string will still render
as "()".

jablib/src/main/java/org/jabref/logic/push/AbstractPushToApplication.java[151-156]
jabgui/src/main/java/org/jabref/gui/push/GuiPushToApplicationSettings.java[49-55]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`AbstractPushToApplication#getCommandName()` now returns an empty string. The GUI settings label logic only checks for `null`, so it will render `(<empty>)` for most applications.
### Issue Context
The UI expects `null` to mean “no distinct command name”. Returning `""` breaks that convention.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/push/AbstractPushToApplication.java[151-156]
- jabgui/src/main/java/org/jabref/gui/push/GuiPushToApplicationSettings.java[49-55]
### Suggested fix
Either:
1) Revert the base implementation to `return null;`, or
2) Update the UI to treat blank as absent (e.g., `StringUtil.isBlank(getCommandName())`) before adding parentheses.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (1)
10. waitFor hangs and swallows interrupt 🐞 Bug ☼ Reliability
Description
PushToSublimeText and PushToTexShop call process.waitFor() without a timeout and catch
InterruptedException without restoring the thread interrupt flag. This can hang background/HTTP
threads indefinitely and breaks cooperative cancellation.
Code

jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java[R71-90]

+            process.waitFor();
+            if (process.exitValue() != 0) {
+                couldNotPush = true;
+                String error = errorStringBuilder.toString().trim();
+                if (!error.isEmpty()) {
+                    sendErrorNotification(Localization.lang("Error pushing entries"),
+                            Localization.lang("Could not push to a running TeXShop server.") + " " + error);
+                }
+            }
+        } catch (IOException | InterruptedException excep) {
LOGGER.warn("Error: Could not call executable '{}'", commandPath, excep);
couldNotCall = true;
+
+            if (excep instanceof IOException) {
+                sendErrorNotification(Localization.lang("Error pushing entries"),
+                        Localization.lang("Could not call executable '%0'.", "osascript") + "\n" +
+                                Localization.lang("Please check the path in the preferences.") + "\n" +
+                                (OS.OS_X ? Localization.lang("On macOS, you can use the command-line binary.") : ""));
+            }
}
Evidence
Both classes call process.waitFor() (no timeout) and catch IOException | InterruptedException
but do not call Thread.currentThread().interrupt() when interrupted, so interruptions are lost and
the wait can block indefinitely.

jablib/src/main/java/org/jabref/logic/push/PushToSublimeText.java[74-94]
jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java[71-90]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`waitFor()` is unbounded and `InterruptedException` is swallowed.
### Issue Context
These push operations run in background tasks (GUI) and can also be triggered in server mode (CAYW). A hanging external process will tie up threads.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/push/PushToSublimeText.java[74-94]
- jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java[71-90]
### Suggested fix
- Replace `process.waitFor()` with `process.waitFor(timeout, TimeUnit.SECONDS)`.
- If the timeout elapses: destroy the process and surface an error.
- In the catch block, when catching `InterruptedException`, call `Thread.currentThread().interrupt()` and set an appropriate failure flag/notification.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Advisory comments

11. Misleading CAYW error text🐞 Bug ⚙ Maintainability
Description
CAYWResource validates command with regex [a-zA-Z*]+ but returns an error message claiming
“alphanumeric characters” are allowed. This is misleading and will confuse users/clients when digits
are rejected.
Code

jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java[R73-79]

+        // Validation of command parameter
+        String command = queryParams.getCommand().orElse("autocite");
+        if (!command.matches("[a-zA-Z*]+")) {
+            LOGGER.warn("Blocked CAYW request with malicious command: {}", command);
+            return Response.status(Response.Status.BAD_REQUEST)
+                           .entity("The 'command' parameter contains invalid characters. Only alphanumeric characters and '*' are allowed.")
+                           .build();
Evidence
The code’s validation only permits letters and '*', but the response entity explicitly claims
alphanumeric characters are allowed, which is inconsistent with the actual validation rule.

jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java[73-80]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The BAD_REQUEST message claims “alphanumeric characters and '*' are allowed” but the regex only allows letters and `*`.
### Issue Context
This is a user/client-facing API error message; it should accurately describe what is permitted.
### Fix Focus Areas
- jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java[73-80]
### Suggested fix
Either:
- Update the message to say “Only letters (A–Z, a–z) and '*' are allowed.”, OR
- If digits are intended to be allowed, update the regex accordingly (and adjust tests/messages consistently).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java
Comment on lines +45 to +47
if (!OS.OS_X) {
sendErrorNotification(Localization.lang("Push to application"), Localization.lang("Pushing citations to TeXShop is only possible on macOS!"));
return;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

4. Texshop text has exclamation 📘 Rule violation ⚙ Maintainability

A new user-facing localized string ends with an exclamation mark, which violates the UI text style
rules. This introduces inconsistent tone across UI messages.
Agent Prompt
## Issue description
A localized UI message ends with `!`, which is disallowed by UI text style rules.

## Issue Context
UI text should be sentence case and avoid exclamation marks.

## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java[45-47]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +34 to +41
void getCommandLineEscapingUnix() {
CitationCommandString maliciousCommand = new CitationCommandString("\\cite{'; touch /tmp/pwned; #", ",", "}");
when(preferences.getCiteCommand()).thenReturn(maliciousCommand);

pushToSublimeText.pushEntries(java.util.List.of());

String[] commandLine = pushToSublimeText.getCommandLine("key");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

5. Test triggers external process 📘 Rule violation ☼ Reliability

The new unit test calls pushEntries(...), which will attempt to start the real /usr/bin/subl
process and makes the test environment-dependent and flaky. Tests should be deterministic and not
execute external processes.
Agent Prompt
## Issue description
The test calls `pushEntries`, which may spawn an external process and makes the test flaky across environments.

## Issue Context
The test’s intent is to validate command-line construction/escaping; it can assert on `getCommandLine(...)` output directly without executing anything.

## Fix Focus Areas
- jablib/src/test/java/org/jabref/logic/push/PushToSublimeTextTest.java[34-41]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Siedlerchr Can you comment on this one?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to test the real commandline invocation

Comment thread jablib/src/main/java/org/jabref/logic/push/PushToSublimeText.java
@Siedlerchr Siedlerchr requested a review from palukku April 27, 2026 19:24
@Siedlerchr

Copy link
Copy Markdown
Member Author

@junie-agent Fix the test

@github-actions

github-actions Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Junie is failed!

Details: ❌ Junie output file path is not set.

This indicates that Junie execution did not complete properly.
Please check the Junie execution logs above for error details.

View job run

@calixtus calixtus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getOrDefault() ?

Comment thread jablib/src/main/java/org/jabref/logic/push/PushToSublimeText.java Outdated
Comment thread jablib/src/main/java/org/jabref/logic/push/PushToEmacs.java Outdated
Comment thread jablib/src/main/java/org/jabref/logic/push/AbstractPushToApplication.java Outdated
Comment thread jablib/src/main/java/org/jabref/logic/push/PushToLyx.java Outdated
Comment thread jablib/src/main/java/org/jabref/logic/push/PushToTexShop.java Outdated
Comment thread jablib/src/main/java/org/jabref/logic/push/PushToVim.java Outdated
Comment on lines +109 to +120
// We use ProcessBuilder to avoid shell injection.
// 'start' is a cmd builtin, so we still need cmd /c start,
// but we should be careful with arguments.
// However, 'start' itself has special handling for double quotes (first quoted arg is title).
processBuilder.command("cmd.exe",
"/c",
"start",
"",
"\"%s\"".formatted(command[0]),
"\"%s\"".formatted(command[1]),
"\"%s\"".formatted(command[2]),
"\"+normal %s|\"".formatted(Integer.toString(column)));
"JabRef to Vim",
command[0],
command[1],
command[2],
command[3]);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this, I think it still can be exploited but I didnt manage to get it done so far

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we can merge and if I sometime manage to exploit it, we can change it again

palukku
palukku previously approved these changes Apr 30, 2026
@palukku palukku added this pull request to the merge queue Apr 30, 2026
@palukku palukku removed this pull request from the merge queue due to a manual request Apr 30, 2026

@calixtus calixtus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getOrDefault?

@github-actions github-actions Bot added the status: changes-required Pull requests that are not yet complete label Apr 30, 2026
@Siedlerchr

Copy link
Copy Markdown
Member Author

Is that a method from the prefs? I am at phone right now

@palukku

palukku commented Apr 30, 2026

Copy link
Copy Markdown
Member

Is that a method from the prefs? I am at phone right now

It is a method of a Map#getOrDefault

@palukku

palukku commented Apr 30, 2026

Copy link
Copy Markdown
Member

The only thing I could see why not using getOrDefault is if, for some weird case, the value stored to the application is null

…urityIssues

* upstream/fixSecurityIssues:
  fix jbang (#15649)
  Add initial claude action support
  Chore(deps): Bump org.glassfish.grizzly:grizzly-bom in /versions (#15648)
  Update IntelliJ settings (#15629)
  Chore(deps): Bump org.openrewrite.recipe:rewrite-recipe-bom (#15626)
  Fixed year not appearing on citation key for In-* entries due to orphaned crossref links (#9071) (#15582)
* upstream/main:
  Chore(deps): Bump dev.langchain4j:langchain4j-bom in /versions (#15652)
  Chore(deps): Bump com.dlsc.gemsfx:gemsfx in /versions (#15651)
  Chore(deps): Bump org.openrewrite.rewrite from 7.31.0 to 7.32.1 (#15645)
  Chore(deps): Bump com.autonomousapps:dependency-analysis-gradle-plugin (#15646)
  Chore(deps): Bump com.autonomousapps:dependency-analysis-gradle-plugin (#15647)
  Chore(deps): Bump jablib/src/main/resources/csl-locales (#15637)
  Chore(deps): Bump timheuer/base64-to-file from 1 to 2 (#15636)
  Chore(deps): Bump org.glassfish.hk2:hk2-api in /versions (#15639)
  Chore(deps): Bump jablib/src/main/resources/csl-styles (#15638)
  Chore(deps): Bump org.postgresql:postgresql in /versions (#15641)
  Chore(deps): Bump org.glassfish.hk2:hk2-locator in /versions (#15640)
  Chore(deps): Bump org.glassfish.hk2:hk2-utils in /versions (#15642)
  Chore(deps): Bump com.dlsc.gemsfx:gemsfx in /versions (#15643)
  Chore(deps): Bump gradle-wrapper from 9.5.0-rc-2 to 9.5.0 (#15632)
@Siedlerchr Siedlerchr enabled auto-merge May 1, 2026 22:04
@Siedlerchr Siedlerchr requested a review from calixtus May 2, 2026 16:30
@calixtus

calixtus commented May 2, 2026

Copy link
Copy Markdown
Member

The only thing I could see why not using getOrDefault is if, for some weird case, the value stored to the application is null

In that case there really should be an exception been thrown.

@Siedlerchr

Copy link
Copy Markdown
Member Author

I changed it to getOrDefault, see no issues with it

Comment thread jablib/src/main/java/org/jabref/logic/push/PushToEmacs.java Outdated
Comment thread jablib/src/main/java/org/jabref/logic/push/PushToLyx.java Outdated
Comment thread jablib/src/main/java/org/jabref/logic/push/PushToVim.java
Comment thread jablib/src/main/java/org/jabref/logic/push/PushToVim.java Outdated
Siedlerchr added 4 commits May 2, 2026 22:52
* upstream/main:
  chore(deps): update jackson monorepo to v3.1.3 (#15659)
  chore(deps): update dependency org.glassfish.hk2:hk2-utils to v4.0.1 (#15657)
  chore(deps): update dependency org.glassfish.hk2:hk2-locator to v4.0.1 (#15656)
  fix gemsfx missing icon resolving (#15655)
  chore(deps): update dependency org.glassfish.hk2:hk2-api to v4.0.1 (#15654)
  chore(deps): update dependency org.postgresql:postgresql to v42.7.11 (#15634)
  Chore(deps): Bump tools.jackson:jackson-bom in /versions (#15653)
@Siedlerchr

Copy link
Copy Markdown
Member Author

failing test is coming from #15655

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

CI Feedback 🧐

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: OpenRewrite

Failed stage: Fail if working directory is unclean [❌]

Failed test name: ""

Failure summary:

The GitHub Action failed because the OpenRewrite/Gradle code-style check detected that applying the
configured recipes would modify the working tree, so the job exited with a non-zero status (Process
completed with exit code 1 at log line 9706).

Evidence from the log:
- OpenRewrite reported it made changes to many files (e.g., log lines
2078-2087 and throughout), and then printed a large git diff showing the required edits (starting
around log line 2871).
- It also reported parse problems in at least two source files, which can
contribute to recipe/check failures:
-
jabgui/src/main/java/org/jabref/gui/specialfields/SpecialFieldAction.java (log line 2075)
-
jablib/src/main/java/org/jabref/logic/search/query/SearchToSqlVisitor.java (log line 2076)

Relevant error logs:
1:  ##[group]Runner Image Provisioner
2:  Hosted Compute Agent
...

652:  32M    ./caches/modules-2/files-2.1/io.zonky.test.postgres/embedded-postgres-binaries-darwin-amd64/18.3.0
653:  32M    ./caches/modules-2/files-2.1/io.zonky.test.postgres/embedded-postgres-binaries-darwin-amd64
654:  32M    ./caches/modules-2/files-2.1/io.zonky.test.postgres/embedded-postgres-binaries-darwin-arm64v8/18.3.0/a136c96f228e931b3c78149a0ae5c0262b6772f8
655:  32M    ./caches/modules-2/files-2.1/io.zonky.test.postgres/embedded-postgres-binaries-darwin-arm64v8/18.3.0
656:  32M    ./caches/modules-2/files-2.1/io.zonky.test.postgres/embedded-postgres-binaries-darwin-arm64v8
657:  15M    ./caches/modules-2/files-2.1/io.zonky.test.postgres/embedded-postgres-binaries-linux-amd64-alpine/18.3.0/28ba722f0ddf4f8b06f91d4d7dbfb28e4b696e1f
658:  15M    ./caches/modules-2/files-2.1/io.zonky.test.postgres/embedded-postgres-binaries-linux-amd64-alpine/18.3.0
659:  15M    ./caches/modules-2/files-2.1/io.zonky.test.postgres/embedded-postgres-binaries-linux-amd64-alpine
660:  15M    ./caches/modules-2/files-2.1/io.zonky.test.postgres/embedded-postgres-binaries-linux-amd64/18.3.0/b96022d00103daccc3f1d0dfcf2f7da2cd6ef3b0
661:  15M    ./caches/modules-2/files-2.1/io.zonky.test.postgres/embedded-postgres-binaries-linux-amd64/18.3.0
662:  15M    ./caches/modules-2/files-2.1/io.zonky.test.postgres/embedded-postgres-binaries-linux-amd64
663:  25M    ./caches/modules-2/files-2.1/io.zonky.test.postgres/embedded-postgres-binaries-windows-amd64/18.3.0/12b0fdca566bd1610c027b1edb90643611a1920a
664:  25M    ./caches/modules-2/files-2.1/io.zonky.test.postgres/embedded-postgres-binaries-windows-amd64/18.3.0
665:  25M    ./caches/modules-2/files-2.1/io.zonky.test.postgres/embedded-postgres-binaries-windows-amd64
666:  130M    ./caches/modules-2/files-2.1/io.zonky.test.postgres
667:  5.1M    ./caches/modules-2/files-2.1/io.github.eisop/dataflow-errorprone/3.41.0-eisop1/3fc86eff95c549e42c41fd7c01c2a57ed46a5a94
668:  5.1M    ./caches/modules-2/files-2.1/io.github.eisop/dataflow-errorprone/3.41.0-eisop1
669:  5.1M    ./caches/modules-2/files-2.1/io.github.eisop/dataflow-errorprone
670:  5.1M    ./caches/modules-2/files-2.1/io.github.eisop
...

1044:  OpenAlexApiKey: 
1045:  SpringerNatureAPIKey: ***
1046:  GRADLE_OPTS: -Xmx4g
1047:  JAVA_OPTS: -Xmx4g
1048:  JAVA_HOME: /opt/hostedtoolcache/Java_Corretto_jdk/25.0.3-9.1/x64
1049:  JAVA_HOME_25_X64: /opt/hostedtoolcache/Java_Corretto_jdk/25.0.3-9.1/x64
1050:  GRADLE_ACTION_ID: gradle/actions/setup-gradle
1051:  GRADLE_USER_HOME: /home/runner/.gradle
1052:  GRADLE_BUILD_ACTION_SETUP_COMPLETED: true
1053:  GRADLE_BUILD_ACTION_CACHE_RESTORED: true
1054:  DEVELOCITY_INJECTION_INIT_SCRIPT_NAME: gradle-actions.inject-develocity.init.gradle
1055:  DEVELOCITY_INJECTION_CUSTOM_VALUE: gradle-actions
1056:  GITHUB_DEPENDENCY_GRAPH_ENABLED: false
1057:  ##[endgroup]
1058:  Starting a Gradle Daemon (subsequent builds will be faster)
1059:  > Task :build-logic:checkKotlinGradlePluginConfigurationErrors SKIPPED
1060:  > Task :build-logic:generateExternalPluginSpecBuilders FROM-CACHE
...

2071:  Using active styles [org.openrewrite.java.Checkstyle]
2072:  Scanning sources in project :
2073:  Using active styles [org.openrewrite.java.Checkstyle]
2074:  There were problems parsing some source files, run with --info to see full stack traces
2075:  There were problems parsing jabgui/src/main/java/org/jabref/gui/specialfields/SpecialFieldAction.java
2076:  There were problems parsing jablib/src/main/java/org/jabref/logic/search/query/SearchToSqlVisitor.java
2077:  All sources parsed, running active recipes: org.jabref.config.rewrite.cleanup
2078:  Changes have been made to jabgui/src/main/java/org/jabref/migrations/PreferencesMigrations.java by:
2079:  org.openrewrite.staticanalysis.SimplifyElseBranch
2080:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2081:  Changes have been made to jabgui/src/main/java/org/jabref/migrations/CustomEntryTypePreferenceMigration.java by:
2082:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2083:  Changes have been made to jabgui/src/main/java/org/jabref/gui/welcome/quicksettings/PushApplicationDialog.java by:
2084:  org.openrewrite.staticanalysis.SimplifyElseBranch
2085:  Changes have been made to jabgui/src/main/java/org/jabref/gui/welcome/quicksettings/viewmodel/ThemeDialogViewModel.java by:
2086:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2087:  Changes have been made to jabgui/src/main/java/org/jabref/gui/openoffice/OOBibBaseConnect.java by:
2088:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2089:  Changes have been made to jabgui/src/main/java/org/jabref/gui/openoffice/OOBibBase.java by:
2090:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2091:  Changes have been made to jabgui/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java by:
2092:  org.openrewrite.staticanalysis.SimplifyElseBranch
2093:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2094:  Changes have been made to jabgui/src/main/java/org/jabref/gui/linkedfile/LinkedFileEditDialog.java by:
2095:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2096:  Changes have been made to jabgui/src/main/java/org/jabref/gui/linkedfile/DownloadLinkedFileAction.java by:
2097:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2098:  Changes have been made to jabgui/src/main/java/org/jabref/gui/libraryproperties/constants/ConstantsItemModel.java by:
2099:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2100:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2101:  Changes have been made to jabgui/src/main/java/org/jabref/gui/libraryproperties/keypattern/KeyPatternPropertiesViewModel.java by:
2102:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2103:  Changes have been made to jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesView.java by:
2104:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2105:  Changes have been made to jabgui/src/main/java/org/jabref/gui/libraryproperties/saving/SavingPropertiesViewModel.java by:
2106:  org.openrewrite.staticanalysis.SimplifyElseBranch
2107:  Changes have been made to jabgui/src/main/java/org/jabref/gui/libraryproperties/LibraryPropertiesAction.java by:
2108:  org.openrewrite.staticanalysis.SimplifyElseBranch
2109:  Changes have been made to jabgui/src/main/java/org/jabref/gui/edit/CopyTo.java by:
2110:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2111:  Changes have been made to jabgui/src/main/java/org/jabref/gui/edit/CopyMoreAction.java by:
2112:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsNotEmptyPredicateRecipe
2113:  Changes have been made to jabgui/src/main/java/org/jabref/gui/edit/ManageKeywordsDialog.java by:
...

2120:  Changes have been made to jabgui/src/main/java/org/jabref/gui/groups/GroupNodeViewModel.java by:
2121:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2122:  Changes have been made to jabgui/src/main/java/org/jabref/gui/groups/GroupModeViewModel.java by:
2123:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2124:  Changes have been made to jabgui/src/main/java/org/jabref/gui/groups/GroupDialogViewModel.java by:
2125:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2126:  Changes have been made to jabgui/src/main/java/org/jabref/gui/groups/GroupDialogView.java by:
2127:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2128:  Changes have been made to jabgui/src/main/java/org/jabref/gui/keyboard/KeyBindingRepository.java by:
2129:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2130:  Changes have been made to jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/sideeffect/SideEffectExecutor.java by:
2131:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2132:  Changes have been made to jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/sideeffect/OpenLibrarySideEffect.java by:
2133:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2134:  Changes have been made to jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/Trigger.java by:
2135:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2136:  Changes have been made to jabgui/src/main/java/org/jabref/gui/documentviewer/DocumentViewerViewModel.java by:
2137:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2138:  Changes have been made to jabgui/src/main/java/org/jabref/gui/undo/CountingUndoManager.java by:
...

2182:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2183:  Changes have been made to jabgui/src/main/java/org/jabref/gui/mergeentries/threewaymerge/fieldsmerger/FileMerger.java by:
2184:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2185:  Changes have been made to jabgui/src/main/java/org/jabref/gui/mergeentries/threewaymerge/MergeEntriesDialog.java by:
2186:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2187:  Changes have been made to jabgui/src/main/java/org/jabref/gui/mergeentries/threewaymerge/diffhighlighter/SplitDiffHighlighter.java by:
2188:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2189:  Changes have been made to jabgui/src/main/java/org/jabref/gui/util/OptionalValueTableCellFactory.java by:
2190:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2191:  Changes have been made to jabgui/src/main/java/org/jabref/gui/util/ControlHelper.java by:
2192:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2193:  Changes have been made to jabgui/src/main/java/org/jabref/gui/util/FileFilterConverter.java by:
2194:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2195:  Changes have been made to jabgui/src/main/java/org/jabref/gui/util/MarkdownTextFlow.java by:
2196:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2197:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2198:  Changes have been made to jabgui/src/main/java/org/jabref/gui/util/WebViewStore.java by:
...

2221:  Changes have been made to jabgui/src/main/java/org/jabref/gui/copyfiles/CopyLinkedFilesAction.java by:
2222:  org.openrewrite.staticanalysis.SimplifyElseBranch
2223:  Changes have been made to jabgui/src/main/java/org/jabref/gui/ai/components/aichat/chatprompt/ChatPromptComponent.java by:
2224:  org.openrewrite.staticanalysis.SimplifyElseBranch
2225:  Changes have been made to jabgui/src/main/java/org/jabref/gui/ai/components/util/EmbeddingModelGuardedComponent.java by:
2226:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2227:  Changes have been made to jabgui/src/main/java/org/jabref/gui/ai/components/summary/SummaryComponent.java by:
2228:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2229:  Changes have been made to jabgui/src/main/java/org/jabref/gui/externalfiles/UnlinkedPDFFileFilter.java by:
2230:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2231:  Changes have been made to jabgui/src/main/java/org/jabref/gui/externalfiles/ExternalFilesEntryLinker.java by:
2232:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2233:  Changes have been made to jabgui/src/main/java/org/jabref/gui/theme/StyleSheetFile.java by:
2234:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2235:  Changes have been made to jabgui/src/main/java/org/jabref/gui/shared/SharedDatabaseLoginDialogViewModel.java by:
2236:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2237:  Changes have been made to jabgui/src/main/java/org/jabref/gui/citationkeypattern/GenerateCitationKeyAction.java by:
2238:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2239:  Changes have been made to jabgui/src/main/java/org/jabref/gui/collab/DatabaseChangesResolverDialog.java by:
2240:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2241:  Changes have been made to jabgui/src/main/java/org/jabref/gui/LibraryTab.java by:
2242:  org.openrewrite.staticanalysis.SimplifyElseBranch
2243:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2244:  Changes have been made to jabgui/src/main/java/org/jabref/gui/autocompleter/AppendPersonNamesStrategy.java by:
2245:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2246:  Changes have been made to jabgui/src/main/java/org/jabref/gui/autocompleter/SuggestionProviders.java by:
2247:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2248:  Changes have been made to jabgui/src/main/java/org/jabref/gui/autocompleter/AppendWordsStrategy.java by:
2249:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2250:  Changes have been made to jabgui/src/main/java/org/jabref/gui/autocompleter/SuggestionProvider.java by:
2251:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2252:  Changes have been made to jabgui/src/main/java/org/jabref/gui/preferences/websearch/WebSearchTabViewModel.java by:
2253:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2254:  Changes have been made to jabgui/src/main/java/org/jabref/gui/preferences/network/NetworkTabViewModel.java by:
2255:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2256:  Changes have been made to jabgui/src/main/java/org/jabref/gui/preferences/network/CustomCertificateViewModel.java by:
2257:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2258:  Changes have been made to jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTabViewModel.java by:
2259:  org.openrewrite.staticanalysis.SimplifyElseBranch
2260:  Changes have been made to jabgui/src/main/java/org/jabref/gui/preferences/protectedterms/ProtectedTermsTabViewModel.java by:
2261:  org.openrewrite.staticanalysis.SimplifyElseBranch
2262:  Changes have been made to jabgui/src/main/java/org/jabref/gui/preferences/protectedterms/ProtectedTermsTab.java by:
2263:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2264:  Changes have been made to jabgui/src/main/java/org/jabref/gui/preferences/journals/JournalAbbreviationsTabViewModel.java by:
2265:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2266:  Changes have been made to jabgui/src/main/java/org/jabref/gui/preferences/journals/AbbreviationsFileViewModel.java by:
2267:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2268:  Changes have been made to jabgui/src/main/java/org/jabref/gui/preferences/ai/AiTabViewModel.java by:
2269:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2270:  Changes have been made to jabgui/src/main/java/org/jabref/gui/preferences/citationkeypattern/CitationKeyPatternTabViewModel.java by:
2271:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2272:  Changes have been made to jabgui/src/main/java/org/jabref/gui/preferences/PreferencesFilter.java by:
...

2282:  Changes have been made to jabgui/src/main/java/org/jabref/gui/fieldeditors/FieldEditors.java by:
2283:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2284:  Changes have been made to jabgui/src/main/java/org/jabref/gui/fieldeditors/optioneditors/LanguageEditorViewModel.java by:
2285:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2286:  Changes have been made to jabgui/src/main/java/org/jabref/gui/fieldeditors/optioneditors/MonthEditorViewModel.java by:
2287:  org.openrewrite.staticanalysis.SimplifyElseBranch
2288:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2289:  Changes have been made to jabgui/src/main/java/org/jabref/gui/fieldeditors/optioneditors/mapbased/MapBasedEditorViewModel.java by:
2290:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2291:  Changes have been made to jabgui/src/main/java/org/jabref/gui/fieldeditors/URLUtil.java by:
2292:  org.openrewrite.staticanalysis.SimplifyElseBranch
2293:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2294:  Changes have been made to jabgui/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java by:
2295:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2296:  Changes have been made to jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogViewModel.java by:
2297:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2298:  Changes have been made to jabgui/src/main/java/org/jabref/gui/autosaveandbackup/BackupManager.java by:
...

2314:  Changes have been made to jabgui/src/main/java/org/jabref/gui/entryeditor/OptionalFieldsTabBase.java by:
2315:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2316:  Changes have been made to jabgui/src/main/java/org/jabref/gui/entryeditor/SourceTab.java by:
2317:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2318:  Changes have been made to jabgui/src/main/java/org/jabref/cli/CliImportHelper.java by:
2319:  org.openrewrite.staticanalysis.SimplifyElseBranch
2320:  Changes have been made to jabgui/src/main/java/org/jabref/Launcher.java by:
2321:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2322:  Changes have been made to jabkit/src/main/java/org/jabref/toolkit/commands/JabKit.java by:
2323:  org.openrewrite.staticanalysis.SimplifyElseBranch
2324:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2325:  Changes have been made to jabkit/src/main/java/org/jabref/toolkit/commands/GenerateBibFromAux.java by:
2326:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2327:  Changes have been made to jablib/src/main/java/org/jabref/logic/push/PushToApplicationDetector.java by:
2328:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2329:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2330:  Changes have been made to jablib/src/main/java/org/jabref/logic/push/AbstractPushToApplication.java by:
2331:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsNotEmptyPredicateRecipe
2332:  Changes have been made to jablib/src/main/java/org/jabref/logic/openoffice/style/JStyleGetCitationMarker.java by:
2333:  org.openrewrite.staticanalysis.SimplifyElseBranch
2334:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2335:  Changes have been made to jablib/src/main/java/org/jabref/logic/openoffice/style/OOFormatBibliography.java by:
2336:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2337:  Changes have been made to jablib/src/main/java/org/jabref/logic/openoffice/style/JStyle.java by:
2338:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2339:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2340:  Changes have been made to jablib/src/main/java/org/jabref/logic/openoffice/style/OOProcess.java by:
2341:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2342:  Changes have been made to jablib/src/main/java/org/jabref/logic/openoffice/style/OOPreFormatter.java by:
2343:  org.openrewrite.java.migrate.lang.SwitchCaseAssignmentsToSwitchExpression
2344:  org.openrewrite.staticanalysis.SimplifyElseBranch
2345:  Changes have been made to jablib/src/main/java/org/jabref/logic/openoffice/backend/Backend52.java by:
2346:  org.openrewrite.staticanalysis.SimplifyElseBranch
2347:  Changes have been made to jablib/src/main/java/org/jabref/logic/openoffice/action/EditMerge.java by:
2348:  org.openrewrite.java.logging.slf4j.ParameterizedLogging
2349:  org.openrewrite.java.logging.ParameterizedLogging: {methodPattern=org.slf4j.Logger warn(..)}
2350:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2351:  Changes have been made to jablib/src/main/java/org/jabref/logic/openoffice/OpenOfficeFileSearch.java by:
2352:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2353:  Changes have been made to jablib/src/main/java/org/jabref/logic/JabRefException.java by:
2354:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2355:  Changes have been made to jablib/src/main/java/org/jabref/logic/layout/LayoutEntry.java by:
2356:  org.openrewrite.staticanalysis.SimplifyElseBranch
2357:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2358:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2359:  Changes have been made to jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java by:
2360:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2361:  Changes have been made to jablib/src/main/java/org/jabref/logic/layout/format/DocBookAuthorFormatter.java by:
2362:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsNotEmptyPredicateRecipe
2363:  Changes have been made to jablib/src/main/java/org/jabref/logic/layout/format/WrapFileLinks.java by:
2364:  org.openrewrite.staticanalysis.SimplifyElseBranch
2365:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2366:  Changes have been made to jablib/src/main/java/org/jabref/logic/layout/format/CurrentDate.java by:
2367:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2368:  Changes have been made to jablib/src/main/java/org/jabref/logic/layout/format/WrapContent.java by:
2369:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2370:  Changes have been made to jablib/src/main/java/org/jabref/logic/layout/format/NameFormatter.java by:
2371:  org.openrewrite.staticanalysis.SimplifyElseBranch
2372:  Changes have been made to jablib/src/main/java/org/jabref/logic/layout/format/HTMLChars.java by:
2373:  org.openrewrite.staticanalysis.SimplifyElseBranch
2374:  Changes have been made to jablib/src/main/java/org/jabref/logic/layout/format/IfPlural.java by:
2375:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2376:  Changes have been made to jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java by:
2377:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2378:  Changes have been made to jablib/src/main/java/org/jabref/logic/layout/format/Authors.java by:
2379:  org.openrewrite.staticanalysis.PreferIncrementOperator
2380:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsNotEmptyPredicateRecipe
2381:  Changes have been made to jablib/src/main/java/org/jabref/logic/layout/LayoutHelper.java by:
2382:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2383:  Changes have been made to jablib/src/main/java/org/jabref/logic/formatter/bibtexfields/AddBracesFormatter.java by:
2384:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2385:  Changes have been made to jablib/src/main/java/org/jabref/logic/formatter/bibtexfields/RemoveEnclosingBracesFormatter.java by:
2386:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2387:  Changes have been made to jablib/src/main/java/org/jabref/logic/formatter/bibtexfields/ConvertMSCCodesFormatter.java by:
2388:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2389:  Changes have been made to jablib/src/main/java/org/jabref/logic/formatter/Formatter.java by:
2390:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2391:  Changes have been made to jablib/src/main/java/org/jabref/logic/formatter/Formatters.java by:
2392:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2393:  Changes have been made to jablib/src/main/java/org/jabref/logic/bst/BstFunctions.java by:
2394:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2395:  Changes have been made to jablib/src/main/java/org/jabref/logic/bst/util/BstWidthCalculator.java by:
2396:  org.openrewrite.staticanalysis.SimplifyElseBranch
2397:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2398:  Changes have been made to jablib/src/main/java/org/jabref/logic/bst/BstVM.java by:
2399:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2400:  Changes have been made to jablib/src/main/java/org/jabref/logic/FilePreferences.java by:
2401:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2402:  Changes have been made to jablib/src/main/java/org/jabref/logic/exporter/SaveException.java by:
2403:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2404:  Changes have been made to jablib/src/main/java/org/jabref/logic/preview/TextBasedPreviewLayout.java by:
2405:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2406:  Changes have been made to jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationLoader.java by:
2407:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2408:  Changes have been made to jablib/src/main/java/org/jabref/logic/journals/ltwa/LtwaTsvParser.java by:
2409:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsNotEmptyPredicateRecipe
2410:  Changes have been made to jablib/src/main/java/org/jabref/logic/journals/Abbreviation.java by:
2411:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2412:  Changes have been made to jablib/src/main/java/org/jabref/logic/citationstyle/CitationStyleCache.java by:
2413:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2414:  Changes have been made to jablib/src/main/java/org/jabref/logic/citationstyle/CSLStyleUtils.java by:
2415:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2416:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/FetcherException.java by:
2417:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2418:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fileformat/MedlineImporter.java by:
2419:  org.openrewrite.staticanalysis.SimplifyElseBranch
2420:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fileformat/EndnoteImporter.java by:
2421:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2422:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fileformat/MedlinePlainImporter.java by:
2423:  org.openrewrite.staticanalysis.SimplifyElseBranch
2424:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2425:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fileformat/ReferImporter.java by:
2426:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2427:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fileformat/RisImporter.java by:
2428:  org.openrewrite.staticanalysis.SimplifyElseBranch
2429:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2430:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fileformat/BibtexParser.java by:
2431:  org.openrewrite.staticanalysis.SimplifyElseBranch
2432:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2433:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fileformat/IsiImporter.java by:
2434:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2435:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fileformat/PicaXmlParser.java by:
2436:  org.openrewrite.staticanalysis.PreferIncrementOperator
2437:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fileformat/pdf/PdfContentImporter.java by:
2438:  org.openrewrite.staticanalysis.PreferIncrementOperator
2439:  org.openrewrite.staticanalysis.SimplifyElseBranch
2440:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2441:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fileformat/CitaviXmlImporter.java by:
2442:  org.openrewrite.staticanalysis.SimplifyElseBranch
2443:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsNotEmptyPredicateRecipe
2444:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fileformat/RepecNepImporter.java by:
2445:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2446:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/ImportFormatReader.java by:
...

2456:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fetcher/JournalInformationFetcher.java by:
2457:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2458:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fetcher/OpenAlex.java by:
2459:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2460:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fetcher/IacrEprintFetcher.java by:
2461:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2462:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fetcher/citation/crossref/CrossRefCitationFetcher.java by:
2463:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2464:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fetcher/citation/semanticscholar/PaperDetails.java by:
2465:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2466:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fetcher/citation/semanticscholar/SemanticScholarCitationFetcher.java by:
2467:  org.openrewrite.java.logging.slf4j.CompleteExceptionLogging
2468:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fetcher/ZbMATH.java by:
2469:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2470:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fetcher/LOBIDFetcher.java by:
2471:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsNotEmptyPredicateRecipe
2472:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fetcher/MedlineFetcher.java by:
2473:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2474:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/fetcher/isbntobibtex/IsbnFetcher.java by:
2475:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2476:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/plaincitation/RuleBasedPlainCitationParser.java by:
2477:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2478:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/util/MetaDataParser.java by:
2479:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2480:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/util/INSPIREBibtexFilterReader.java by:
2481:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2482:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/util/FileFieldParser.java by:
2483:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2484:  Changes have been made to jablib/src/main/java/org/jabref/logic/importer/AuthorListParser.java by:
2485:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2486:  Changes have been made to jablib/src/main/java/org/jabref/logic/texparser/DefaultLatexParser.java by:
2487:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2488:  Changes have been made to jablib/src/main/java/org/jabref/logic/util/UpdateField.java by:
2489:  org.openrewrite.staticanalysis.SimplifyElseBranch
2490:  Changes have been made to jablib/src/main/java/org/jabref/logic/util/URLUtil.java by:
2491:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2492:  Changes have been made to jablib/src/main/java/org/jabref/logic/util/Version.java by:
2493:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2494:  Changes have been made to jablib/src/main/java/org/jabref/logic/util/BackgroundTask.java by:
2495:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2496:  Changes have been made to jablib/src/main/java/org/jabref/logic/util/io/XMLUtil.java by:
2497:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2498:  Changes have been made to jablib/src/main/java/org/jabref/logic/util/io/FileUtil.java by:
2499:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2500:  Changes have been made to jablib/src/main/java/org/jabref/logic/util/io/BackupFileUtil.java by:
2501:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2502:  Changes have been made to jablib/src/main/java/org/jabref/logic/util/strings/StringUtil.java by:
2503:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2504:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2505:  Changes have been made to jablib/src/main/java/org/jabref/logic/util/ExternalLinkCreator.java by:
...

2520:  org.openrewrite.staticanalysis.SimplifyElseBranch
2521:  Changes have been made to jablib/src/main/java/org/jabref/logic/ai/AiPreferences.java by:
2522:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2523:  Changes have been made to jablib/src/main/java/org/jabref/logic/ai/models/OpenAiCompatibleModelProvider.java by:
2524:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2525:  Changes have been made to jablib/src/main/java/org/jabref/logic/msbib/MSBibConverter.java by:
2526:  org.openrewrite.staticanalysis.SimplifyElseBranch
2527:  Changes have been made to jablib/src/main/java/org/jabref/logic/remote/client/RemoteClient.java by:
2528:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2529:  Changes have been made to jablib/src/main/java/org/jabref/logic/shared/DBMSProcessor.java by:
2530:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2531:  Changes have been made to jablib/src/main/java/org/jabref/logic/citationkeypattern/BracketedPattern.java by:
2532:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2533:  Changes have been made to jablib/src/main/java/org/jabref/logic/citationkeypattern/CitationKeyGenerator.java by:
2534:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2535:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2536:  Changes have been made to jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java by:
2537:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2538:  Changes have been made to jablib/src/main/java/org/jabref/logic/quality/consistency/BibliographyConsistencyCheckResultWriter.java by:
2539:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2540:  Changes have been made to jablib/src/main/java/org/jabref/logic/cleanup/TimestampToDateField.java by:
2541:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2542:  Changes have been made to jablib/src/main/java/org/jabref/logic/cleanup/FieldFormatterCleanup.java by:
2543:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2544:  Changes have been made to jablib/src/main/java/org/jabref/logic/cleanup/UpgradePdfPsToFileCleanup.java by:
2545:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2546:  Changes have been made to jablib/src/main/java/org/jabref/logic/cleanup/FieldFormatterCleanupActions.java by:
...

2556:  Changes have been made to jablib/src/main/java/org/jabref/logic/net/URLDownload.java by:
2557:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2558:  Changes have been made to jablib/src/main/java/org/jabref/logic/search/query/GroupNameFilterVisitor.java by:
2559:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2560:  Changes have been made to jablib/src/main/java/org/jabref/logic/search/query/SearchToLuceneVisitor.java by:
2561:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2562:  Changes have been made to jablib/src/main/java/org/jabref/logic/search/query/SearchQueryVisitor.java by:
2563:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2564:  Changes have been made to jablib/src/main/java/org/jabref/logic/search/query/SearchFlagsToExpressionVisitor.java by:
2565:  org.openrewrite.staticanalysis.SimplifyElseBranch
2566:  Changes have been made to jablib/src/main/java/org/jabref/logic/search/query/SearchQueryExtractorVisitor.java by:
2567:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2568:  Changes have been made to jablib/src/main/java/org/jabref/logic/search/IndexManager.java by:
2569:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2570:  Changes have been made to jablib/src/main/java/org/jabref/logic/integrity/BooktitleContainsCountryChecker.java by:
2571:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsNotEmptyPredicateRecipe
2572:  Changes have been made to jablib/src/main/java/org/jabref/logic/integrity/EditionChecker.java by:
...

2580:  Changes have been made to jablib/src/main/java/org/jabref/logic/bibtex/comparator/GroupDiff.java by:
2581:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2582:  Changes have been made to jablib/src/main/java/org/jabref/logic/bibtex/comparator/CrossRefEntryComparator.java by:
2583:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2584:  Changes have been made to jablib/src/main/java/org/jabref/logic/bibtex/comparator/PreambleDiff.java by:
2585:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2586:  Changes have been made to jablib/src/main/java/org/jabref/logic/bibtex/comparator/EntryComparator.java by:
2587:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2588:  Changes have been made to jablib/src/main/java/org/jabref/logic/bibtex/comparator/MetaDataDiff.java by:
2589:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2590:  Changes have been made to jablib/src/main/java/org/jabref/logic/bibtex/comparator/FieldComparator.java by:
2591:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2592:  Changes have been made to jablib/src/main/java/org/jabref/logic/bibtex/TypedBibEntry.java by:
2593:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2594:  Changes have been made to jablib/src/main/java/org/jabref/logic/bibtex/BibEntryWriter.java by:
2595:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2596:  Changes have been made to jablib/src/main/java/org/jabref/logic/xmp/XmpUtilWriter.java by:
...

2603:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2604:  Changes have been made to jablib/src/main/java/org/jabref/model/openoffice/util/OOResult.java by:
2605:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2606:  Changes have been made to jablib/src/main/java/org/jabref/model/openoffice/util/OOVoidResult.java by:
2607:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2608:  Changes have been made to jablib/src/main/java/org/jabref/model/openoffice/ootext/OOTextIntoOO.java by:
2609:  org.openrewrite.staticanalysis.SimplifyElseBranch
2610:  Changes have been made to jablib/src/main/java/org/jabref/model/openoffice/uno/UnoRedlines.java by:
2611:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2612:  Changes have been made to jablib/src/main/java/org/jabref/model/database/BibDatabaseModeDetection.java by:
2613:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2614:  Changes have been made to jablib/src/main/java/org/jabref/model/database/BibDatabaseMode.java by:
2615:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2616:  Changes have been made to jablib/src/main/java/org/jabref/model/entry/BibEntry.java by:
2617:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2618:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsNotEmptyPredicateRecipe
2619:  Changes have been made to jablib/src/main/java/org/jabref/model/entry/Date.java by:
...

2664:  org.openrewrite.java.testing.junit5.CsvSourceToValueSource
2665:  Changes have been made to jablib/src/test/java/org/jabref/logic/importer/fileformat/BibtexParserTest.java by:
2666:  org.openrewrite.java.testing.junit5.CsvSourceToValueSource
2667:  Changes have been made to jablib/src/test/java/org/jabref/logic/importer/fileformat/BibtexImporterTest.java by:
2668:  org.openrewrite.java.testing.junit5.CsvSourceToValueSource
2669:  Changes have been made to jablib/src/test/java/org/jabref/logic/importer/fileformat/MedlinePlainImporterTest.java by:
2670:  org.openrewrite.java.testing.junit5.CsvSourceToValueSource
2671:  Changes have been made to jablib/src/test/java/org/jabref/logic/importer/fetcher/RfcFetcherTest.java by:
2672:  org.openrewrite.java.testing.junit5.CsvSourceToValueSource
2673:  Changes have been made to jablib/src/test/java/org/jabref/logic/util/io/FileHistoryTest.java by:
2674:  org.openrewrite.java.migrate.util.SequencedCollection
2675:  org.openrewrite.java.migrate.util.ListFirstAndLast
2676:  Changes have been made to jablib/src/test/java/org/jabref/logic/l10n/LocalizationParser.java by:
2677:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2678:  Changes have been made to jablib/src/test/java/org/jabref/logic/l10n/JavaLocalizationEntryParser.java by:
2679:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe
2680:  Changes have been made to jablib/src/test/java/org/jabref/logic/search/query/SearchQueryTest.java by:
2681:  org.openrewrite.java.testing.junit5.CsvSourceToValueSource
2682:  Changes have been made to jablib/src/test/java/org/jabref/logic/integrity/NoURLCheckerTest.java by:
2683:  org.openrewrite.java.testing.junit5.CsvSourceToValueSource
2684:  Changes have been made to jablib/src/test/java/org/jabref/model/entry/AuthorTest.java by:
2685:  org.openrewrite.java.testing.junit5.CsvSourceToValueSource
2686:  Changes have been made to jablib/src/test/java/org/jabref/model/entry/MonthTest.java by:
2687:  org.openrewrite.java.testing.junit5.CsvSourceToValueSource
2688:  Changes have been made to jabls/src/main/java/org/jabref/languageserver/util/LspIntegrityCheck.java by:
2689:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2690:  Changes have been made to jabsrv/src/main/java/org/jabref/http/server/resources/EntryResource.java by:
2691:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2692:  Changes have been made to jabsrv/src/main/java/org/jabref/http/server/cayw/gui/SearchResultContainer.java by:
2693:  org.openrewrite.staticanalysis.UnwrapElseAfterReturn
2694:  Changes have been made to jabsrv/src/main/java/org/jabref/http/server/cayw/CitationProperties.java by:
2695:  tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsNotEmptyPredicateRecipe
2696:  Changes have been made to jabsrv/src/main/java/org/jabref/http/server/services/ServerUtils.java by:
...

2871:  -                }
2872:  +            } else // When currentUserMessageScroll is set to NEW_NON_EXISTENT_MESSAGE, then we should:
2873:  +            // 1) either clear the prompt, if user scrolls down the most recent history entry.
2874:  +            // 2) do nothing, if user starts to edit the history entry.
2875:  +            // We distinguish these two cases by checking showingHistoryMessage, which is true for -1 message, and false for others.
2876:  +            if (showingHistoryMessage.get()) {
2877:  +                userPromptTextArea.setText("");
2878:  }
2879:  });
2880:  }
2881:  diff --git a/jabgui/src/main/java/org/jabref/gui/ai/components/summary/SummaryComponent.java b/jabgui/src/main/java/org/jabref/gui/ai/components/summary/SummaryComponent.java
2882:  index e7bbabb..13d972e 100644
2883:  --- a/jabgui/src/main/java/org/jabref/gui/ai/components/summary/SummaryComponent.java
2884:  +++ b/jabgui/src/main/java/org/jabref/gui/ai/components/summary/SummaryComponent.java
2885:  @@ -86,9 +86,8 @@ public class SummaryComponent extends AiPrivacyNoticeGuardedComponent {
2886:  return showErrorNotPdfs();
2887:  } else if (!CitationKeyCheck.citationKeyIsPresentAndUnique(bibDatabaseContext, entry)) {
2888:  return tryToGenerateCitationKeyThenBind(entry);
2889:  -        } else {
2890:  -            return tryToShowSummary();
2891:  }
2892:  +        return tryToShowSummary();
2893:  }
2894:  private Node showErrorNoDatabasePath() {
2895:  @@ -118,9 +117,8 @@ public class SummaryComponent extends AiPrivacyNoticeGuardedComponent {
2896:  Localization.lang("Unable to generate summary"),
2897:  Localization.lang("Please provide a non-empty and unique citation key for this entry.")
2898:  );
2899:  -        } else {
2900:  -            return showPrivacyPolicyGuardedContent();
2901:  }
2902:  +        return showPrivacyPolicyGuardedContent();
2903:  }
2904:  private Node tryToShowSummary() {
2905:  diff --git a/jabgui/src/main/java/org/jabref/gui/ai/components/util/EmbeddingModelGuardedComponent.java b/jabgui/src/main/java/org/jabref/gui/ai/components/util/EmbeddingModelGuardedComponent.java
2906:  index 34316fd..9062f4e 100644
2907:  --- a/jabgui/src/main/java/org/jabref/gui/ai/components/util/EmbeddingModelGuardedComponent.java
2908:  +++ b/jabgui/src/main/java/org/jabref/gui/ai/components/util/EmbeddingModelGuardedComponent.java
2909:  @@ -40,12 +40,10 @@ public abstract class EmbeddingModelGuardedComponent extends AiPrivacyNoticeGuar
2910:  if (!aiService.getEmbeddingModel().isPresent()) {
2911:  if (aiService.getEmbeddingModel().hadErrorWhileBuildingModel()) {
2912:  return showErrorWhileBuildingEmbeddingModel();
2913:  -            } else {
2914:  -                return showBuildingEmbeddingModel();
2915:  }
2916:  -        } else {
2917:  -            return showEmbeddingModelGuardedContent();
2918:  +            return showBuildingEmbeddingModel();
2919:  }
2920:  +        return showEmbeddingModelGuardedContent();
2921:  }
2922:  private Node showErrorWhileBuildingEmbeddingModel() {
2923:  diff --git a/jabgui/src/main/java/org/jabref/gui/autocompleter/AppendPersonNamesStrategy.java b/jabgui/src/main/java/org/jabref/gui/autocompleter/AppendPersonNamesStrategy.java
...

3054:  -                    } else {
3055:  -                        return ConsistencySymbol.UNKNOWN_FIELD_AT_ENTRY_TYPE_CELL_ENTRY.getText();
3056:  }
3057:  +                    return ConsistencySymbol.UNKNOWN_FIELD_AT_ENTRY_TYPE_CELL_ENTRY.getText();
3058:  }).orElse(ConsistencySymbol.UNSET_FIELD_AT_ENTRY_TYPE_CELL_ENTRY.getText()))
3059:  );
3060:  return result;
3061:  diff --git a/jabgui/src/main/java/org/jabref/gui/copyfiles/CopyLinkedFilesAction.java b/jabgui/src/main/java/org/jabref/gui/copyfiles/CopyLinkedFilesAction.java
3062:  index c388544..358b763 100644
3063:  --- a/jabgui/src/main/java/org/jabref/gui/copyfiles/CopyLinkedFilesAction.java
3064:  +++ b/jabgui/src/main/java/org/jabref/gui/copyfiles/CopyLinkedFilesAction.java
3065:  @@ -88,12 +88,10 @@ public class CopyLinkedFilesAction extends SimpleCommand {
3066:  } else {
3067:  dialogService.notify(Localization.lang("Could not copy file to %0, maybe the file is already existing?", target));
3068:  }
3069:  +        } else if (failedCount == 0) {
3070:  +            dialogService.notify(Localization.lang("Successfully copied %0 file(s) to %1.", copiedFiles, target));
3071:  } else {
3072:  -            if (failedCount == 0) {
3073:  -                dialogService.notify(Localization.lang("Successfully copied %0 file(s) to %1.", copiedFiles, target));
3074:  -            } else {
3075:  -                dialogService.notify(Localization.lang("Copied %0 file(s). Failed: %1", copiedFiles, failedCount));
3076:  -            }
3077:  +            dialogService.notify(Localization.lang("Copied %0 file(s). Failed: %1", copiedFiles, failedCount));
3078:  }
...

3217:  otherFields.removeIf(field -> field instanceof UserSpecificCommentField);
3218:  return otherFields;
3219:  -        } else {
3220:  -            // Entry type unknown -> treat all fields as required (thus no other fields)
3221:  -            return new LinkedHashSet<>();
3222:  }
3223:  +        // Entry type unknown -> treat all fields as required (thus no other fields)
3224:  +        return new LinkedHashSet<>();
3225:  }
3226:  }
3227:  diff --git a/jabgui/src/main/java/org/jabref/gui/entryeditor/SourceTab.java b/jabgui/src/main/java/org/jabref/gui/entryeditor/SourceTab.java
3228:  index e0ad2c5..d5cf724 100644
3229:  --- a/jabgui/src/main/java/org/jabref/gui/entryeditor/SourceTab.java
3230:  +++ b/jabgui/src/main/java/org/jabref/gui/entryeditor/SourceTab.java
3231:  @@ -302,13 +302,12 @@ public class SourceTab extends EntryEditorTab {
3232:  dialogService.showErrorDialogAndWait(errors);
3233:  validationMessage.setValue(ValidationMessage.error(Localization.lang("Failed to parse Bib(La)TeX: %0", errors)));
3234:  return;
3235:  -            } else {
3236:  -                LOGGER.warn("No entries found.");
3237:  -                String errors = Localization.lang("No entries available");
3238:  -                dialogService.showErrorDialogAndWait(errors);
3239:  -                validationMessage.setValue(ValidationMessage.error(Localization.lang("Failed to parse Bib(La)TeX: %0", errors)));
3240:  -                return;
3241:  }
3242:  +            LOGGER.warn("No entries found.");
3243:  +            String errors = Localization.lang("No entries available");
3244:  +            dialogService.showErrorDialogAndWait(errors);
3245:  +            validationMessage.setValue(ValidationMessage.error(Localization.lang("Failed to parse Bib(La)TeX: %0", errors)));
3246:  +            return;
...

3668:  -                            Thread.sleep(100);
3669:  }
3670:  +                        Thread.sleep(100);
3671:  }
3672:  return null;
3673:  }
3674:  diff --git a/jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogViewModel.java b/jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogViewModel.java
3675:  index 14a5070..a4d4162 100644
3676:  --- a/jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogViewModel.java
3677:  +++ b/jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogViewModel.java
3678:  @@ -52,7 +52,7 @@ public class GitCommitDialogViewModel extends AbstractViewModel {
3679:  this.commitMessageValidator = new FunctionBasedValidator<>(
3680:  commitMessage,
3681:  -                message -> message != null && !message.trim().isEmpty(),
3682:  +                message -> message != null && !message.isBlank(),
3683:  ValidationMessage.error(Localization.lang("Commit message cannot be empty"))
3684:  );
...

3710:  -                        if (!inputPath.isAbsolute() || !Files.isRegularFile(inputPath)) {
3711:  -                            return false;
3712:  -                        }
3713:  -                        return FileUtil.getFileExtension(input)
3714:  -                                       .map("aux"::equalsIgnoreCase)
3715:  -                                       .orElse(false);
3716:  }
3717:  +                    Path inputPath = getAbsoluteTexGroupPath(input);
3718:  +                    if (!inputPath.isAbsolute() || !Files.isRegularFile(inputPath)) {
3719:  +                        return false;
3720:  +                    }
3721:  +                    return FileUtil.getFileExtension(input)
3722:  +                            .map("aux"::equalsIgnoreCase)
3723:  +                            .orElse(false);
3724:  },
3725:  ValidationMessage.error(Localization.lang("Please provide a valid aux file.")));
3726:  diff --git a/jabgui/src/main/java/org/jabref/gui/groups/GroupModeViewModel.java b/jabgui/src/main/java/org/jabref/gui/groups/GroupModeViewModel.java
...

3907:  -                dialogService.showCustomDialogAndWait(new LibraryPropertiesView(stateManager.getActiveDatabase().get()));
3908:  -            } else {
3909:  -                LOGGER.warn("No library selected.");
3910:  -            }
3911:  +            LOGGER.warn("No library selected.");
3912:  }
3913:  }
3914:  }
3915:  diff --git a/jabgui/src/main/java/org/jabref/gui/libraryproperties/constants/ConstantsItemModel.java b/jabgui/src/main/java/org/jabref/gui/libraryproperties/constants/ConstantsItemModel.java
3916:  index fb262a5..694c05f 100644
3917:  --- a/jabgui/src/main/java/org/jabref/gui/libraryproperties/constants/ConstantsItemModel.java
3918:  +++ b/jabgui/src/main/java/org/jabref/gui/libraryproperties/constants/ConstantsItemModel.java
3919:  @@ -65,7 +65,7 @@ public class ConstantsItemModel {
3920:  private static ValidationMessage validateLabel(String input) {
3921:  if (input == null) {
3922:  return ValidationMessage.error("May not be null");
3923:  -        } else if (input.trim().isEmpty()) {
3924:  +        } else if (input.isBlank()) {
3925:  return ValidationMessage.error(Localization.lang("Please enter the string's label"));
3926:  } else if (IS_NUMBER.matcher(input).matches()) {
3927:  return ValidationMessage.error(Localization.lang("The label of the string cannot be a number."));
3928:  @@ -73,18 +73,16 @@ public class ConstantsItemModel {
3929:  return ValidationMessage.error(Localization.lang("The label of the string cannot contain the '#' character."));
3930:  } else if (input.contains(" ")) {
3931:  return ValidationMessage.error(Localization.lang("The label of the string cannot contain spaces."));
3932:  -        } else {
3933:  -            return null; // everything is ok
3934:  }
3935:  +        return null; // everything is ok
3936:  }
3937:  private static ValidationMessage validateContent(String input) {
3938:  if (input == null) {
3939:  return ValidationMessage.error(Localization.lang("Must not be empty!"));
3940:  -        } else if (input.trim().isEmpty()) {
3941:  +        } else if (input.isBlank()) {
3942:  return ValidationMessage.error(Localization.lang("Must not be empty!"));
3943:  -        } else {
...

4007:  }
4008:  SaveOrder newSaveOrder = new SaveOrder(
4009:  diff --git a/jabgui/src/main/java/org/jabref/gui/linkedfile/DownloadLinkedFileAction.java b/jabgui/src/main/java/org/jabref/gui/linkedfile/DownloadLinkedFileAction.java
4010:  index f1e567b..e1e93ba 100644
4011:  --- a/jabgui/src/main/java/org/jabref/gui/linkedfile/DownloadLinkedFileAction.java
4012:  +++ b/jabgui/src/main/java/org/jabref/gui/linkedfile/DownloadLinkedFileAction.java
4013:  @@ -229,15 +229,13 @@ public class DownloadLinkedFileAction extends SimpleCommand {
4014:  Localization.lang("Unable to find valid certification path to requested target(%0), download anyway?",
4015:  urlDownload.getSource().toString()))) {
4016:  return true;
4017:  -                } else {
4018:  -                    dialogService.notify(Localization.lang("Download operation canceled."));
4019:  -                    return false;
4020:  }
4021:  -            } else {
4022:  -                LOGGER.error("Error while checking if the file can be downloaded", ex);
4023:  -                dialogService.notify(Localization.lang("Error downloading"));
4024:  +                dialogService.notify(Localization.lang("Download operation canceled."));
4025:  return false;
4026:  }
4027:  +            LOGGER.error("Error while checking if the file can be downloaded", ex);
4028:  +            dialogService.notify(Localization.lang("Error downloading"));
4029:  +            return false;
...

4038:  this.setResultConverter(button -> {
4039:  if (button == primaryButtonType) {
4040:  return viewModel.getNewLinkedFile();
4041:  -            } else {
4042:  -                return null;
4043:  }
4044:  +            return null;
4045:  });
4046:  }
4047:  diff --git a/jabgui/src/main/java/org/jabref/gui/maintable/CellFactory.java b/jabgui/src/main/java/org/jabref/gui/maintable/CellFactory.java
4048:  index 19abeff..8886119 100644
4049:  --- a/jabgui/src/main/java/org/jabref/gui/maintable/CellFactory.java
4050:  +++ b/jabgui/src/main/java/org/jabref/gui/maintable/CellFactory.java
4051:  @@ -101,9 +101,8 @@ public class CellFactory {
4052:  if (icon == null) {
4053:  // LOGGER.info("Error: no table icon defined for type '" + field + "'.");
4054:  return null;
...

4214:  @@ -25,8 +25,7 @@ public class GroupMerger implements FieldMerger {
4215:  return groupsB;
4216:  } else if (StringUtil.isBlank(groupsB)) {
4217:  return groupsA;
4218:  -        } else {
4219:  -            return KeywordList.merge(groupsA, groupsB, delimiter).getAsString(delimiter);
4220:  }
4221:  +        return KeywordList.merge(groupsA, groupsB, delimiter).getAsString(delimiter);
4222:  }
4223:  }
4224:  diff --git a/jabgui/src/main/java/org/jabref/gui/openoffice/OOBibBase.java b/jabgui/src/main/java/org/jabref/gui/openoffice/OOBibBase.java
4225:  index f357516..893b2a1 100644
4226:  --- a/jabgui/src/main/java/org/jabref/gui/openoffice/OOBibBase.java
4227:  +++ b/jabgui/src/main/java/org/jabref/gui/openoffice/OOBibBase.java
4228:  @@ -150,14 +150,13 @@ public class OOBibBase {
4229:  OOVoidResult<OOError> collectResults(String errorTitle, List<OOVoidResult<OOError>> results) {
4230:  String msg = results.stream()
4231:  -                            .filter(OOVoidResult::isError)
4232:  -                            .map(e -> e.getError().getLocalizedMessage())
4233:  -                            .collect(Collectors.joining("\n\n"));
4234:  +                .filter(OOVoidResult::isError)
4235:  +                .map(e -> e.getError().getLocalizedMessage())
4236:  +                .collect(Collectors.joining("\n\n"));
4237:  if (msg.isEmpty()) {
4238:  return OOVoidResult.ok();
4239:  -        } else {
4240:  -            return OOVoidResult.error(new OOError(errorTitle, msg));
4241:  }
4242:  +        return OOVoidResult.error(new OOError(errorTitle, msg));
4243:  }
4244:  boolean testDialog(OOVoidResult<OOError> res) {
4245:  @@ -291,9 +290,8 @@ public class OOBibBase {
4246:  OOVoidResult<OOError> styleIsRequired(OOStyle style) {
4247:  if (style == null) {
4248:  return OOVoidResult.error(OOError.noValidStyleSelected());
4249:  -        } else {
4250:  -            return OOVoidResult.ok();
4251:  }
4252:  +        return OOVoidResult.ok();
4253:  }
4254:  OOResult<OOFrontend, OOError> getFrontend(XTextDocument doc) {
4255:  @@ -312,18 +310,16 @@ public class OOBibBase {
4256:  Supplier<OOError> fun) {
4257:  if (databases == null || databases.isEmpty()) {
4258:  return OOVoidResult.error(fun.get());
4259:  -        } else {
4260:  -            return OOVoidResult.ok();
4261:  }
4262:  +        return OOVoidResult.ok();
4263:  }
4264:  OOVoidResult<OOError> selectedBibEntryIsRequired(List<BibEntry> entries,
4265:  Supplier<OOError> fun) {
4266:  if (entries == null || entries.isEmpty()) {
4267:  return OOVoidResult.error(fun.get());
4268:  -        } else {
4269:  -            return OOVoidResult.ok();
4270:  }
4271:  +        return OOVoidResult.ok();
4272:  }
4273:  /*
4274:  @@ -849,16 +845,15 @@ public class OOBibBase {
4275:  dialogService.showErrorDialogAndWait(
4276:  Localization.lang(errorTitle),
4277:  Localization.lang("Your OpenOffice/LibreOffice document references"
4278:  -                                        + " at least %0 citation keys"
4279:  -                                        + " which could not be found in your current library."
4280:  -                                        + " Some of these are %1.",
4281:  +                                + " at least %0 citation keys"
4282:  +                                + " which could not be found in your current library."
4283:  +                                + " Some of these are %1.",
4284:  String.valueOf(unresolvedKeys.size()),
4285:  String.join(", ", unresolvedKeys)));
4286:  if (returnPartialResult) {
4287:  return Optional.of(result.newDatabase);
4288:  -                } else {
4289:  -                    return FAIL;
4290:  }
4291:  +                return FAIL;
4292:  }
...

4312:  +++ b/jabgui/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java
4313:  @@ -194,23 +194,21 @@ public class OpenOfficePanel {
4314:  if (currentStyle == null) {
4315:  currentStyle = openOfficePreferences.getCurrentStyle();
4316:  currentStyleProperty.set(currentStyle);
4317:  -        } else {
4318:  -            if (currentStyle instanceof JStyle jStyle) {
4319:  -                try {
4320:  -                    jStyle = jStyleLoader.getUsedJstyle();
4321:  -                    jStyle.ensureUpToDate();
4322:  -                } catch (IOException ex) {
4323:  -                    LOGGER.warn("Unable to reload style file '{}'", jStyle.getPath(), ex);
4324:  -                    String msg = Localization.lang("Unable to reload style file")
4325:  -                            + "'" + jStyle.getPath() + "'"
4326:  -                            + "\n" + ex.getMessage();
4327:  -                    new OOError(title, msg, ex).showErrorDialog(dialogService);
4328:  -                    return FAIL;
4329:  -                }
4330:  -            } else {
4331:  -                // CSL Styles don't need to be updated
4332:  -                return PASS;
4333:  +        } else if (currentStyle instanceof JStyle jStyle) {
4334:  +            try {
4335:  +                jStyle = jStyleLoader.getUsedJstyle();
4336:  +                jStyle.ensureUpToDate();
4337:  +            } catch (IOException ex) {
4338:  +                LOGGER.warn("Unable to reload style file '{}'", jStyle.getPath(), ex);
4339:  +                String msg = Localization.lang("Unable to reload style file")
4340:  +                        + "'" + jStyle.getPath() + "'"
4341:  +                        + "\n" + ex.getMessage();
4342:  +                new OOError(title, msg, ex).showErrorDialog(dialogService);
4343:  +                return FAIL;
4344:  }
...

4489:  -        } else {
4490:  -            return false;
4491:  }
4492:  +        return false;
4493:  }
4494:  }
4495:  diff --git a/jabgui/src/main/java/org/jabref/gui/preferences/journals/JournalAbbreviationsTabViewModel.java b/jabgui/src/main/java/org/jabref/gui/preferences/journals/JournalAbbreviationsTabViewModel.java
4496:  index ca04e09..e7fce59 100644
4497:  --- a/jabgui/src/main/java/org/jabref/gui/preferences/journals/JournalAbbreviationsTabViewModel.java
4498:  +++ b/jabgui/src/main/java/org/jabref/gui/preferences/journals/JournalAbbreviationsTabViewModel.java
4499:  @@ -238,11 +238,11 @@ public class JournalAbbreviationsTabViewModel implements PreferenceTabViewModel
4500:  }
4501:  private void setCurrentAbbreviationNameAndAbbreviationIfValid(Abbreviation abbreviationObject) {
4502:  -        if (abbreviationObject.getName().trim().isEmpty()) {
4503:  +        if (abbreviationObject.getName().isBlank()) {
4504:  dialogService.showErrorDialogAndWait(Localization.lang("Name cannot be empty"));
4505:  return;
4506:  }
4507:  -        if (abbreviationObject.getAbbreviation().trim().isEmpty()) {
4508:  +        if (abbreviationObject.getAbbreviation().isBlank()) {
4509:  dialogService.showErrorDialogAndWait(Localization.lang("Abbreviation cannot be empty"));
4510:  return;
...

5123:  ChangeListener<String> listener = (_, _, newText) -> {
5124:  -                    if (!newText.trim().isEmpty()) {
5125:  +                    if (!newText.isBlank()) {
5126:  // A text input change doesn't have an "original action" to wrap, so we pass NOTHING.
5127:  onNavigate.apply(NOTHING);
5128:  }
5129:  diff --git a/jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/sideeffect/OpenLibrarySideEffect.java b/jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/sideeffect/OpenLibrarySideEffect.java
5130:  index dee7f9a..4b5acf5 100644
5131:  --- a/jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/sideeffect/OpenLibrarySideEffect.java
5132:  +++ b/jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/sideeffect/OpenLibrarySideEffect.java
5133:  @@ -107,10 +107,9 @@ public class OpenLibrarySideEffect implements WalkthroughSideEffect {
5134:  LOGGER.debug("Successfully closed example library tab");
5135:  createdTab = null;
5136:  return true;
5137:  -            } else {
5138:  -                LOGGER.warn("Failed to close example library tab");
5139:  -                return false;
5140:  }
5141:  +            LOGGER.warn("Failed to close example library tab");
5142:  +            return false;
5143:  }
5144:  Optional<LibraryTab> exampleTab = findLibraryTab();
5145:  diff --git a/jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/sideeffect/SideEffectExecutor.java b/jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/sideeffect/SideEffectExecutor.java
5146:  index d6f0c2b..eef49fa 100644
5147:  --- a/jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/sideeffect/SideEffectExecutor.java
5148:  +++ b/jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/sideeffect/SideEffectExecutor.java
5149:  @@ -61,9 +61,8 @@ public class SideEffectExecutor {
5150:  return false;
5151:  }
5152:  return...

@Siedlerchr Siedlerchr disabled auto-merge May 3, 2026 20:18
@Siedlerchr Siedlerchr merged commit b8663fe into main May 3, 2026
51 of 53 checks passed
@Siedlerchr Siedlerchr deleted the fixSecurityIssues branch May 3, 2026 20:18
Siedlerchr added a commit to FynnianB/jabref that referenced this pull request May 4, 2026
…rity

* upstream/main: (204 commits)
  New Crowdin updates (JabRef#15669)
  Fix OpenRewrite (JabRef#15670)
  Udpate heylogs (and fix CHANGELOG.md) (JabRef#15671)
  Improve security and prevent shell injection for push2applications (JabRef#15628)
  Fix depdency analysis (JabRef#15668)
  Always use CI-local "gradle", instead of gradlew (JabRef#15667)
  Change OpenRewrite task to use rewriteDryRun (JabRef#15664)
  Add small documentation to parameter (JabRef#15666)
  Fix markbaseChanged for "imported entries" (JabRef#15610)
  Add forgotten --fresh
  chore(deps): update dependency com.github.ben-manes.caffeine:caffeine to v3.2.4 (JabRef#15662)
  chore(deps): update jackson monorepo to v3.1.3 (JabRef#15659)
  chore(deps): update dependency org.glassfish.hk2:hk2-utils to v4.0.1 (JabRef#15657)
  chore(deps): update dependency org.glassfish.hk2:hk2-locator to v4.0.1 (JabRef#15656)
  fix gemsfx missing icon resolving (JabRef#15655)
  chore(deps): update dependency org.glassfish.hk2:hk2-api to v4.0.1 (JabRef#15654)
  chore(deps): update dependency org.postgresql:postgresql to v42.7.11 (JabRef#15634)
  Chore(deps): Bump tools.jackson:jackson-bom in /versions (JabRef#15653)
  Chore(deps): Bump dev.langchain4j:langchain4j-bom in /versions (JabRef#15652)
  Chore(deps): Bump com.dlsc.gemsfx:gemsfx in /versions (JabRef#15651)
  ...
Siedlerchr added a commit that referenced this pull request May 5, 2026
* upstream/main: (775 commits)
  Chore(deps): Bump com.konghq:unirest-modules-gson in /versions (#15682)
  Chore(deps): Bump org.glassfish.jaxb:jaxb-runtime in /versions (#15681)
  Update dependency com.konghq:unirest-modules-gson to v4.9.0 (#15679)
  Integrate with SearchRxiv  (#15373)
  Fix requirements (#15600)
  refactor: less objects during writing (#15677)
  Fix: suppress WARN for empty or blank column name in MainTableColumnModel#parse() (#15576)
  New Crowdin updates (#15676)
  Chore(deps): Bump com.github.ben-manes.caffeine:caffeine in /versions (#15673)
  Fix Nullwarnings - C (Mark bst package as nonnull by default) (#15663)
  Chore(deps): Bump com.github.javaparser:javaparser-symbol-solver-core (#15674)
  Chore(deps): Bump com.github.javaparser:javaparser-core in /versions (#15672)
  New Crowdin updates (#15669)
  Fix OpenRewrite (#15670)
  Udpate heylogs (and fix CHANGELOG.md) (#15671)
  Improve security and prevent shell injection for push2applications (#15628)
  Fix depdency analysis (#15668)
  Always use CI-local "gradle", instead of gradlew (#15667)
  Change OpenRewrite task to use rewriteDryRun (#15664)
  Add small documentation to parameter (#15666)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: changes-required Pull requests that are not yet complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants