XWIKI-23828: extend setWikiPreference to update several preferences a…#5180
Draft
Sereza7 wants to merge 1 commit intoxwiki:masterfrom
Draft
XWIKI-23828: extend setWikiPreference to update several preferences a…#5180Sereza7 wants to merge 1 commit intoxwiki:masterfrom
Sereza7 wants to merge 1 commit intoxwiki:masterfrom
Conversation
…t once * Added the new util method. * Updated two tests to use it instead of multiple calls to setWikiPreference
tmortagne
reviewed
Feb 12, 2026
| public void setWikiPreferences(Map<String, String> properties) throws Exception | ||
| { | ||
| for (Map.Entry<String, String> entry : properties.entrySet()) { | ||
| setWikiPreference(entry.getKey(), entry.getValue()); |
Member
There was a problem hiding this comment.
Not a fan of this implementation honestly. I would have done the opposite: save all properties in a single save, and make setWikiPreference(String propertyName, String value) call the new method with a map containing only one entry.
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
Changes
Description
Clarifications
Screenshots & Video
None, test change only.
Executed Tests
Built the main change with
mvn clean install -f xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui -Pqualitysuccessfully.After that, I updated some docker tests where using this new util would make sense and ran them:
mvn clean install -f xwiki-platform-core/xwiki-platform-edit/xwiki-platform-edit-test/xwiki-platform-edit-test-dockermvn clean install -f xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-test/xwiki-platform-flamingo-skin-test-docker -Dit.test=DeletePageITBoth docker test builds passed successfully even with the changes.
Expected merging strategy