From bd8e087be5b05b06e19290e07e441722bc8adef9 Mon Sep 17 00:00:00 2001 From: Alexander Zolotov Date: Mon, 26 Jan 2015 20:13:06 +0300 Subject: [PATCH] Use singletonList insteadof ArrayList --- .../com/intellij/refactoring/IntroduceTargetChooser.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/refactoring/IntroduceTargetChooser.java b/platform/lang-impl/src/com/intellij/refactoring/IntroduceTargetChooser.java index f94cb1f6c431..982c5ca0cd61 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/IntroduceTargetChooser.java +++ b/platform/lang-impl/src/com/intellij/refactoring/IntroduceTargetChooser.java @@ -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 toExtract = new ArrayList(); - toExtract.add(expr); - highlighter.highlight(expr, toExtract); + highlighter.highlight(expr, Collections.singletonList(expr)); } });