On Wed, 18 Mar 2026 09:30:50 GMT, Prasanta Sadhukhan <[email protected]>
wrote:
>> Support for the new DateTimeFormatter in JFormattedTextField is added
>
> Prasanta Sadhukhan has updated the pull request incrementally with two
> additional commits since the last revision:
>
> - Fix
> - Fix
I'm not sure this is following the pattern for other value types.
I've highlighted at least a few issues but I need to understand how this API is
supposed to work to be sure I've spotted everything.
src/java.desktop/share/classes/javax/swing/JFormattedTextField.java line 545:
> 543: */
> 544: public Object getValue() {
> 545: if (value instanceof DateTimeFormatter formatter) {
This looks odd. Surely the value field stores a LocalDate not text ?
Otherwise how do all the other types work ?
-------------
PR Review: https://git.openjdk.org/jdk/pull/30292#pullrequestreview-3988646331
PR Review Comment: https://git.openjdk.org/jdk/pull/30292#discussion_r2972144014