On Mon, 31 Jul 2023 10:26:44 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

> The private field `mask` is never used in `JFormattedTextField`.
> 
> I couldn't find any usages of the field, including JNI. Therefore, it is safe 
> to remove.

It was left there since the JFormattedTextField class is Serializable, and it 
is a kind of "public" API because it is mentioned in the serializable form of 
this class(I think so). See an example where I had to add the spec to the 
private fields via CSR: https://bugs.openjdk.org/browse/JDK-8252544

But the JFormattedTextField is part of the Swing where we intentionally added a 
statement "Serialized objects of this class will not be compatible with future 
Swing releases" So we can delete it but probably CSR will be needed, I am not 
sure.

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

PR Comment: https://git.openjdk.org/jdk/pull/15088#issuecomment-1659520041

Reply via email to