From 0282d0ef8d42aa5ab52de85c0f494b13118988fb Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Thu, 4 Sep 2025 02:56:10 +0200 Subject: [PATCH] Fix regression in MnemonicEditor#setValue regression since 879f45f964621f43291df3842aae3bd094e3c2f7 --- .../src/org/netbeans/modules/form/editors/MnemonicEditor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/java/form/src/org/netbeans/modules/form/editors/MnemonicEditor.java b/java/form/src/org/netbeans/modules/form/editors/MnemonicEditor.java index 9052f75971d6..9c0aba0fb657 100644 --- a/java/form/src/org/netbeans/modules/form/editors/MnemonicEditor.java +++ b/java/form/src/org/netbeans/modules/form/editors/MnemonicEditor.java @@ -133,9 +133,11 @@ public void setAsText(String text) throws IllegalArgumentException { public void setValue(Object newValue) throws IllegalArgumentException { if (newValue instanceof Integer) { super.setValue(newValue); + return; } else if (newValue instanceof Character) { char c = (Character) newValue; super.setValue((int)c); + return; } else if (newValue instanceof String) { String text = (String) newValue; if (text.length() >= 1) {