Users can write their own settings, for example, a setting that performs probabilistic sampling. The SettingControl class contains example snippets that show how to write user-defined settings, but they are not as robust as they should be. For example, what should happen when an invalid value is passed to the SettingControl? The specification states that a SettingControl should not throw an exception, and if an incorrect value is used, the existing value should be kept.
The examples should follow the specification and also demonstrate how a default value is returned if all combined values are invalid.
The examples should follow the specification and also demonstrate how a default value is returned if all combined values are invalid.
- links to
-
Commit(master) openjdk/jdk/63bf7918
-
Review(master) openjdk/jdk/24056