following test snippet fails with IllegalStateException:
@Test
public void testSpinnerSkin() {
Spinner<?> spinner = new Spinner<>();
spinner.setSkin(new SpinnerSkin<>(spinner));
spinner.setSkin(new SpinnerSkin<>(spinner));
}
Exception:
java.lang.IllegalArgumentException: Children: duplicate children added: parent = Spinner@2b40ff9c[styleClass=spinner]
at javafx.graphics/javafx.scene.Parent$3.onProposedChange(Parent.java:560)
at javafx.base/com.sun.javafx.collections.VetoableListDecorator.add(VetoableListDecorator.java:206)
at javafx.controls/javafx.scene.control.skin.SpinnerSkin.<init>(SpinnerSkin.java:112)
at javafx.controls/test.javafx.scene.control.skin.SkinIssuesTest.testSpinnerSkin(SkinIssuesTest.java:92)
turned up working on JDK-8244531
don't quite understand why it is a problem here but not in ComboXX (which may or may not have an editor) - they also have editors, any ideas?
NOTE: the fix requires both ListenerHelper JDK-8294809 and Skin.install() JDK-8290844 changes.