Peter
February 5, 2026, 6:17pm
1
main ← petersmythe:peter-sorted-properties-take2
opened 08:34AM - 01 Feb 26 UTC
[](http… s://osgeo-org.atlassian.net/browse/GEOS-11886) [<img width="16" alt="Powered by Pull Request Badge" src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=geoserver&utm_campaign=badge_info)
Replace usages of java.util.Properties.store(...) with org.geoserver.util.SortedProperties so properties files are written in alphabetical order by default (easier diffs), while preserving insertion order when explicitly requested via LinkedProperties
This PR builds on the useful feedback from @groldan in https://github.com/geoserver/geoserver/pull/8665
Motivation: Alphabetical ordering reduces noisy diffs and makes reviews of properties changes easier. For properties where order is semantically important (security rules, etc.) developers can create LinkedProperties which maintains the insertion order (e.g. for RESTAccessRulesDAO)
What I changed:
- Replaced Properties with SortedProperties in the following production files:
- LockFile.java
- PropertyAuthenticationKeyMapper.java
- MonitorConfig.java
- DefaultControlFlowConfigurator.java
- JDBCLoaderPropertiesFactoryBean.java
- GeoServerResourceStreamLocator.java
- ImageMosaicAdditionalResourceReader.java
- ImageMosaicAdditionalResourceWriter.java
- TemplateInfoDAOImpl.java
- GeoServerPropertyConfigurer.java
- ImporterInfoDAO.java
- MosaicIndex.java
- DownloadServiceConfigurationWatcher.java
- JDBCStatusStoreLoader.java
- Fixed test imports (removed wildcard imports -> explicit asserts) and updated tests to import required assert methods.
- Resolved formatting (Spotless) and static analysis issues:
- Applied mvn spotless:apply where needed.
- Fixed PMD wildcard import violations in tests.
- Updated Javadoc links that caused warnings.
- Added small test/import fixes in:
- LinkedPropertiesTest.java (added missing asserts, formatting)
- DefaultControlFlowConfigurationTest.java (use org.geoserver.util.LinkedProperties)
- Files touched: 14 production files, several tests and formatting fixes.
# Checklist
- [x] I have read the [contribution guidelines](https://github.com/geoserver/geoserver/blob/main/CONTRIBUTING.md).
- [x] I have sent a [Contribution Licence Agreement](https://docs.geoserver.org/latest/en/developer/policies/committing.html) (not required for small changes, e.g., fixing typos in documentation).
- [x] First PR targets the `main` branch (backports managed later; ignore for branch specific issues).
For core and extension modules:
- [x] New unit tests have been added covering the changes.
- [x] [Documentation](https://github.com/geoserver/geoserver/tree/main/doc/en/user/source) has been updated (if change is visible to end users).
- [ ] The [REST API docs](https://github.com/geoserver/geoserver/tree/main/doc/en/api/1.0.0) have been updated (when changing configuration objects or the REST controllers).
- [x] There is an issue in the [GeoServer Jira](https://osgeo-org.atlassian.net/browse/GEOS/summary) (except for changes that do not affect administrators or end users in any way).
- [x] Commit message(s) must be in the form ``[GEOS-XYZWV] Title of the Jira ticket``.
- [ ] Bug fixes and small new features are presented as a single commit.
- [x] Each commit has a single objective (if there are multiple commits, each has a separate JIRA ticket describing its goal).
The PR will be merged when all the build checks are green ([see automated QA checks](https://docs.geoserver.org/latest/en/developer/qa-guide/index.html)), there is a code committer review, and the checklist has been fulfilled.
Hi devs, I’d appreciate your final review on the above PR to make properties files sorted (aside for the one which must remain in insertion order: RESTAccessRulesDAO)
Thank you
Peter