RFR: 8250802: Refactor StringConverter and its subclasses [v5]

John Hendrikx jhendrikx at openjdk.org
Thu Nov 20 01:14:20 UTC 2025


On Mon, 25 Aug 2025 09:40:01 GMT, Nir Lisker <nlisker at openjdk.org> wrote:

>> modules/javafx.base/src/main/java/javafx/util/converter/FormatStringConverter.java line 42:
>> 
>>> 40:     private final Format format;
>>> 41: 
>>> 42:     /// Creates a `StringConverter` for arbitrary types that uses the given `Format`.
>> 
>> Shouldn't that be `FormatStringConverter` that it creates?
>> 
>> To be honest, I never bother repeating this on constructors, so I just write "Creates a new instance ... "
>
> All the converters used this language prior. The language on constructors isn't unified across JavaFX and the JDK.  Between "Creates a new default instance", "Creates a default <class name>", "Constructs a..." and others I don't have a preference. I can replace all class names with "new instance" if you think it's better.

I know it is not unified (anywhere).  I only point it out as it wasn't even unified in this PR.  Feel free to ignore if you think it is not important.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1880#discussion_r2544012209


More information about the openjfx-dev mailing list