On Thu, 19 Mar 2026 22:10:01 GMT, Damon Nguyen <[email protected]> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with two 
>> additional commits since the last revision:
>> 
>>  - Fix
>>  - Fix
>
> src/java.desktop/share/classes/javax/swing/JFormattedTextField.java line 900:
> 
>> 898:             };
>> 899:             return new DefaultFormatterFactory(abstractFormatter);
>> 900:         }
> 
> I noticed each other instance type has its own formatter class (ex: Date & 
> DateFormatter). Should `stringToValue` and `valueToString` be elsewhere? I 
> suppose it's functionally fine here, but it doesn't seem to follow the rest 
> of the types.

That is because they are swing formatter and extends `DefaultFormatter`. 
`DateTimeFormatter `is `java.time` package and doesn;t extend DefaultFormatter 
so we need to explicitly create AbstractFormatter so that 
getDefaultFormatterFactory returns compatible object

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30292#discussion_r2963528804

Reply via email to