RFR: 8250802: Refactor StringConverter and its subclasses [v2]
Nir Lisker
nlisker at openjdk.org
Wed Nov 19 00:45:14 UTC 2025
On Mon, 17 Nov 2025 22:59:57 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> Nir Lisker has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - review comments 2
>> - review comments 1
>
> modules/javafx.base/src/main/java/javafx/util/StringConverter.java line 38:
>
>> 36: /// - Except for `DefaultStringConverter`, formatting `null` returns an empty string, otherwise the type's `toString` is
>> 37: /// used if it is suitable; parsing `null` or an empty string returns `null`.
>> 38: /// - Immutable (the same converter can be reused).
>
> Is this true?
> I recall some formatters having a state, but I don't remember which...
Some do, but that state is immutable. Converters build a formatter/parser on construction (if at all needed) and use it for the duration of their existence. There are some deprecations that we need to do regarding inspecting the internal state.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1880#discussion_r2540061733
More information about the openjfx-dev
mailing list