Fix not on fx thread cleanup#15835
Conversation
Review Summary by QodoFix cleanup operations to use mutation scheduler for entry updates
WalkthroughsDescription• Fix cleanup operations not using mutation scheduler for entry updates • Ensure file I/O operations run on correct thread via scheduler • Remove unused Optional utility imports and simplify code • Add tests verifying mutation scheduler is used correctly Diagramflowchart LR
A["Cleanup Operations<br/>MoveFilesCleanup<br/>RenamePdfCleanup"] -->|"Use mutationScheduler<br/>for entry.setFiles()"| B["Thread-safe<br/>Entry Updates"]
C["File I/O Operations<br/>Background Thread"] -->|"Scheduled via<br/>mutationScheduler"| B
B -->|"Prevents<br/>FX Thread Exceptions"| D["Fixed Issue #15833"]
File Changes1. jablib/src/main/java/org/jabref/logic/cleanup/MoveFilesCleanup.java
|
Code Review by Qodo
1.
|
* upstream/main: (29 commits) Chore(deps): Bump dev.langchain4j:langchain4j-bom in /versions (JabRef#15853) Chore(deps): Bump org.glassfish.jaxb:jaxb-runtime in /versions (JabRef#15854) Chore(deps): Bump com.gradleup.shadow:shadow-gradle-plugin (JabRef#15852) Chore(deps): Bump com.gradleup.shadow:shadow-gradle-plugin (JabRef#15849) Chore(deps): Bump com.autonomousapps:dependency-analysis-gradle-plugin (JabRef#15850) Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.6 (JabRef#15844) Fix reset and import of AiPreferences (JabRef#15843) Fix Comparable Contract Violation in SharedBibEntryData (JabRef#15806) (JabRef#15842) Chore(deps): Bump com.dlsc.gemsfx:gemsfx from 4.0.5 to 4.1.0 in /versions (JabRef#15841) Chore(deps): Bump jablib/src/main/resources/csl-styles (JabRef#15840) New Crowdin updates (JabRef#15839) Add group pseudonymization support (fixes JabRef#14117) (JabRef#15258) Feature parse MeSH terms in PubMed MEDLINE records (JabRef#15529) Fix/non latin author parsed as name prefix (JabRef#15823) Fix not on fx thread cleanup (JabRef#15835) Fix garbled BibEntry Javadoc example (JabRef#15834) Revert "Fix cleanup operationn setFiles not on fx thread causes exceptiosn" Revert "changelog" changelog Fix cleanup operationn setFiles not on fx thread causes exceptiosn ...
Related issues and pull requests
Found while checking out #15833
PR Description
Steps to test
Have an entry with a pdf linked which is not yet in target dir
open bib entry in entry editor
Quality -> cleanup -> File related -> Rename pdf and move files
AI usage
chat gpt codex 5.3 for adding the tests
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)