role-strategy-plugin icon indicating copy to clipboard operation
role-strategy-plugin copied to clipboard

write config sorted into config.xml

Open kazesberger opened this issue 9 years ago • 4 comments

problem: every time one saves the config page of this plugin, the resulting xml got randomly reordered speaking of sid and permission elements. this makes diffing messy in case one wants to have the config.xml in a git repo. solution: i made SortedSets (TreeSet) where needed without touching the actual persistence code.

kazesberger avatar Dec 16 '15 21:12 kazesberger

:+1:

KostyaSha avatar Dec 16 '15 22:12 KostyaSha

The change needs migration tests at least. Just to make sure that the upgrade works correctly

oleg-nenashev avatar Dec 21 '15 09:12 oleg-nenashev

Wouldn't it be possible convert set to treeset only during deserialization?

KostyaSha avatar Dec 24 '15 12:12 KostyaSha

Is there someone still having this pull request in mind?

darxriggs avatar Feb 09 '19 09:02 darxriggs

Using TreeSet has also the disadvantage that is has worse performance compared to HashSet. So a TreeSet should only be used when writing the config xml or when generating the CasC yaml

mawinter69 avatar Aug 28 '22 14:08 mawinter69