Reuse CoarseGrainedFilter for autosave and backup#13682
Merged
Conversation
Co-authored-by: Christoph <siedlerkiller@gmail.com> Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
Comment on lines
+70
to
+73
| @AfterEach | ||
| void shutdown() { | ||
| BackupManager.shutdown(bibDatabaseContext, backupDir, false); | ||
| } |
There was a problem hiding this comment.
When using @tempdir annotation, there's no need for explicit cleanup in @AfterEach. The temporary directory is automatically cleaned up by JUnit.
calixtus
previously approved these changes
Aug 11, 2025
|
|
||
| // All subscribers needing "coarse" change events should use this filter | ||
| // See https://devdocs.jabref.org/code-howtos/eventbus.html for details | ||
| private CoarseChangeFilter coarseChangeFilter; |
There was a problem hiding this comment.
The field is not marked as final despite being initialized in the constructor and never reassigned, which could lead to potential thread-safety issues and violates immutability principles.
Member
Author
There was a problem hiding this comment.
This lead me to a flaw in the logic ^^
…bRef/jabref into single-instance-of-coarsechangefilter
|
@trag-bot didn't find any issues in the code! ✅✨ |
jabref-machine
approved these changes
Aug 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needed for #13295
While reviewing #13295, we thought, we need a CoarseChangeFilter. There were too many in JabRef. fixed here.
Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if change is visible to the user)