Fixed ArrayIndexOutOfBoundsException when the selected text is not among known values. BLD200204260200
authormentlicher@netbeans.org
Thu, 25 Apr 2002 12:07:13 +0000
changeset 2204dd0a42e4566c
parent 2203 35d95d0772c9
child 2205 14709ef9199a
Fixed ArrayIndexOutOfBoundsException when the selected text is not among known values.
This is a fix of issue #22714.
vcscore/src/org/netbeans/modules/vcscore/util/VariableInputDialog.java
     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;