On Tue, 5 Sep 2023 23:27:51 GMT, Michael Strauß <mstra...@openjdk.org> wrote:
>> is it actually possible to have keys removed at runtime? > > The set of preferences that is reported by a platform is hard-coded in the > native platform implementation, and depends on the operating system version. > It might indeed be the case that an OS upgrade/downgrade could result in a > different set of reported properties, but can this happen while a JavaFX > applications remains running? > > In any case, even if that were to happen, the current behavior is that a > preference that was once reported will not be removed. Looks like I spoke too soon. Mappings can actually be removed at runtime, one such example is `Windows.SPI.HighContrastColorScheme`, which is only available if `Windows.SPI.HighContrast` is `true`. This doesn't change the `ChangedValue` implementation, and there are tests that cover the key removal scenario. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1014#discussion_r1319364873