On Mon, 16 Nov 2020 20:01:49 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
> The Windows L&F uses the windows specific class XPStyle as part of the border > in the JSpinner. This class cannot be serialized and causes an exception > during serialization. The root cause is that BasicSpinnerUI forgot to reset > the border in uninstallUI() by the LookAndFeel.uninstallBorder(). I have > found one more place where the LookAndFeel.installBorder() is not followed by > the LookAndFeel.uninstallBorder() in the AquaSpinnerUI. test/jdk/javax/swing/JSpinner/SerializationTest.java line 44: > 42: * @summary Verifies that JSpinner can be serialized/deserialized > correctly. > 43: * @run main/othervm SerializationTest > 44: * @run main/othervm -Djava.awt.headless=true SerializationTest The test will cover the old use case(headless) and the headful as well. ------------- PR: https://git.openjdk.java.net/jdk/pull/1234