Fixed ArrayIndexOutOfBoundsException when the selected text is not among known values.
This is a fix of issue #22714.
1.1 --- a/vcscore/src/org/netbeans/modules/vcscore/util/VariableInputDialog.java Thu Apr 25 11:36:50 2002 +0000
1.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/util/VariableInputDialog.java Thu Apr 25 12:07:13 2002 +0000
1.3 @@ -1349,8 +1349,10 @@
1.4 } else i = 0;
1.5 if (i >= 0) comboBox.setSelectedIndex(i);
1.6 else comboBox.setSelectedItem(selected);
1.7 - enableComponents(varsEnabled[i], true);
1.8 - enableComponents(varsDisabled[i], false);
1.9 + if (i >= 0) {
1.10 + enableComponents(varsEnabled[i], true);
1.11 + enableComponents(varsDisabled[i], false);
1.12 + }
1.13 comboBox.addActionListener(new ActionListener() {
1.14 public void actionPerformed(ActionEvent event) {
1.15 String currentValue;