-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batch remove entries #5659
Merged
Merged
Batch remove entries #5659
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
80e8377
Initial changes to remove entry functionality
abepolk 48cb7fd
Fix logic error in KeyChangeListener
abepolk 923b40e
Fix logic error in BasePanel
abepolk a0ffcb5
Changes to tests
abepolk b08ae88
Fix typo
abepolk 3a830a8
Move remove entry calls to batch version
abepolk 4e57a46
Un-propagate for loop in KeyChangeListener
abepolk b990e0d
Finalize changes to SharedEntriesNotPresentEvent
abepolk 3122e67
Fix bug
abepolk aac840c
Fix other compile errors
abepolk 90c27f1
Fix bug and update tests
abepolk a0cafc4
Fix tests
abepolk 868deed
Merge master
abepolk 2afb868
Fix test omission
abepolk 460f44a
Update l10n
abepolk f11389e
For loop to citationStyle
abepolk f535a0b
Add comment for method not working
abepolk 77ff450
Clarify var name
abepolk b0805cc
Allow single entry for undo
abepolk 7ac7a1c
Replace compound edit undo with normal undo in BasePanel
abepolk 8255ad2
Typo
abepolk 3b8dfea
Simplify loop in DBMSSynchronizer
abepolk 5f1b811
Use if instead of stream
abepolk c41dc17
Pluralize Javadoc
abepolk bb88484
EntryEvent -> EntriesEvent in Javadoc, comments, and var names
abepolk 4c97c64
Make imports explicit in BasePanel
abepolk 30d8d51
Merge master
abepolk 125d33a
Batch delete to SQL
abepolk 5cf5965
Final EntriesRemovedEvent fixes
abepolk 1df2869
Fix checkStyleMain
abepolk 0f5d76f
Merge branch 'master' into refactor_group_entryevents
abepolk 13abf0c
More checkStyle fixes
abepolk 17f04b0
More fixes
abepolk 214e958
Move List coercion into DuplicateSearchResult method
abepolk a90c44e
Fix typo
abepolk 648c5da
Fix pesky BibDatabaseTest error with setStrings
abepolk b0f585a
Fixed BibDatabase Javadoc
abepolk c6300e5
Merge master
abepolk a187b42
Finish master merge, start changing DBMS tests
abepolk d6d15a7
Merge refactor_group_entryevents
abepolk f8c94cc
Add comment
abepolk aaf73e7
Final fixes including checkStyle
abepolk 120b6d5
Add DBMSProcessor tests
abepolk b023741
Fix checkStyleTest
abepolk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be keep the single test? -> Meaning the additional test for two entries is OK, but we should also keep the simple (and probably always succeeding test). - Reason: The for loop above is not entered for one entry and thus this test case is special.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could, but it would still have to be
dbmsProcessor.removeEntries(Collections.singletonList(entryToRemove))
because I got rid ofDBMSProcessor.removeEntry
in the singular. Is it still worth it?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. The tests should be independent of the implemention somehow. Tests should cover the general case, but also edge cases, null list, 0 element list, list with 1 elements, list with integer.max elements (which is impossible IMHO), but the other cases should be easy to do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, in that case I will use
Collections.singletonList
. Should I add a test for each of those edge cases as well?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, please go ahead. In case tests are easy to write, they should be written. - The thing is: The implementation could change in 1 year (who knows) and the test will still cover that case.
Please also add a test for
dbmsProcessor.removeEntries(Collections.emptyList())
dbmsProcessor.removeEntries(null)
(should throw a NPE)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throw on empty list? If so, throw what? I can't imagine why someone would want to call
removeEntries
on purpose on an empty list.