File tree 1 file changed +2
-12
lines changed
src/main/java/org/scijava/ui/swing/widget
1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 31
31
32
32
import java .awt .event .ActionEvent ;
33
33
import java .awt .event .ActionListener ;
34
+ import java .util .Arrays ;
34
35
35
36
import javax .swing .JComboBox ;
36
37
import javax .swing .JPanel ;
@@ -102,7 +103,7 @@ public boolean supports(final WidgetModel model) {
102
103
public void doRefresh () {
103
104
final String [] choices = get ().getChoices ();
104
105
105
- if (!areListsEqual (choices , comboBoxItems ())) {
106
+ if (!Arrays . equals (choices , comboBoxItems ())) {
106
107
comboBox .removeAllItems ();
107
108
for (int i =0 ; i <choices .length ; i ++)
108
109
comboBox .addItem (choices [i ]);
@@ -113,17 +114,6 @@ public void doRefresh() {
113
114
}
114
115
}
115
116
116
- private boolean areListsEqual (String [] list1 , String [] list2 ) {
117
- if (list1 .length != list2 .length )
118
- return false ;
119
-
120
- for (int i =0 ; i < list1 .length ; i ++)
121
- if (!list1 [i ].equals (list2 [i ]))
122
- return false ;
123
-
124
- return true ;
125
- }
126
-
127
117
private String [] comboBoxItems () {
128
118
String [] comboItems = new String [comboBox .getItemCount ()];
129
119
for (int i =0 ; i <comboBox .getItemCount (); i ++)
You can’t perform that action at this time.
0 commit comments