Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
InterpreterSetting: don't crash when sorting settings.
The existing comparator would return -1 for both (a, b) and (b, a), if both of these settings keys are not present in the template, and such behaviour violates required comparator properties. The issue manifests with exception in the form java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.TimSort.mergeLo(TimSort.java:777) and prevents server from starting up. ### What type of PR is it? Bug Fix ### Questions: * Does the licenses files need update? I don't think, the change is trivial. * Is there breaking changes for older versions? No. * Does this needs documentation? No. Author: Vladimir Prus <[email protected]> Closes apache#4075 from vprus/interpreter-settings-sorting-v2 and squashes the following commits: 7cd0b64 [Vladimir Prus] Cosmetics 47e129a [Vladimir Prus] Remove spurious change 0cbc70f [Vladimir Prus] Cosmetrics. e032d99 [Vladimir Prus] InterpreterSetting: don't crash when sorting settings.
- Loading branch information