mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Use singletonList insteadof ArrayList
This commit is contained in:
@@ -31,7 +31,7 @@ import javax.swing.*;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class IntroduceTargetChooser {
|
||||
@@ -104,9 +104,7 @@ public class IntroduceTargetChooser {
|
||||
final int index = list.getSelectedIndex();
|
||||
if (index < 0 ) return;
|
||||
final T expr = (T)model.get(index);
|
||||
final ArrayList<PsiElement> toExtract = new ArrayList<PsiElement>();
|
||||
toExtract.add(expr);
|
||||
highlighter.highlight(expr, toExtract);
|
||||
highlighter.highlight(expr, Collections.<PsiElement>singletonList(expr));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user