XWIKI-24268: Hibernate attachment versioning store loses the initial 1.1 version when an attachment is first updated#5398
Open
XWIKI-24268: Hibernate attachment versioning store loses the initial 1.1 version when an attachment is first updated#5398
Conversation
…1.1 version when an attachment is first updated
michitux
reviewed
Apr 20, 2026
Comment on lines
+71
to
+72
| @SuppressWarnings("unchecked") | ||
| Query<Long> mockQuery = mock(Query.class); |
Contributor
There was a problem hiding this comment.
Suggested change
| @SuppressWarnings("unchecked") | |
| Query<Long> mockQuery = mock(Query.class); | |
| Query<Long> mockQuery = mock(); |
Shorter and doesn't trigger any warnings. It's more recent than most code that the coding agents are trained on I fear so they prefer the old version. It makes sense to have an explicit instruction like
Prefer Mockito methods with empty parameters like
mock()instead ofmock(Class.class)and
ArgumentCaptor.captor()instead ofArgumentCaptor.forClass(Class.class).
Member
Author
There was a problem hiding this comment.
Thx, it's not just the LLM that didn't know about it :) I didn't either. It's nice.
…1.1 version when an attachment is first updated * Improved test thx to Michael
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.
Jira URL
https://jira.xwiki.org/browse/XWIKI-24268
Changes
See https://jira.xwiki.org/browse/XWIKI-24268
Executed Tests
Expected merging strategy