java.util.Arraysjava.util.Collections



Project JetBrains/intellij-community in file ...ntellij.debugger.settings.ImageObjectRenderer.java (2014-10-29)
@@ -32,7 +32,7 @@ import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import javax.swing.*;
-import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -88,7 +88,7 @@ class ImageObjectRenderer extends CompoundReferenceRenderer implements FullValue
     if (cls != null) {
       List<Method> methods = cls.methodsByName(methodName);
       if (!methods.isEmpty()) {
-        return process.invokeMethod(evaluationContext, cls, methods.get(0), Arrays.asList(obj));
+        return process.invokeMethod(evaluationContext, cls, methods.get(0), Collections.singletonList(obj));
       }
     }
     return null;
Project JetBrains/intellij-community in file ...llij.debugger.actions.JvmSmartStepIntoHandler.java (2014-11-05)
@@ -42,7 +42,7 @@ import javax.swing.*;
 import javax.swing.event.ListSelectionEvent;
 import javax.swing.event.ListSelectionListener;
 import java.awt.event.ActionEvent;
-import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -122,7 +122,7 @@ public abstract class JvmSmartStepIntoHandler {
   private static void highlightTarget(PsiMethodListPopupStep popupStep, SmartStepTarget target) {
     final PsiElement highlightElement = target.getHighlightElement();
     if (highlightElement != null) {
-      popupStep.getScopeHighlighter().highlight(highlightElement, Arrays.asList(highlightElement));
+      popupStep.getScopeHighlighter().highlight(highlightElement, Collections.singletonList(highlightElement));
     }
   }
 
Project apache/cassandra in file ....apache.cassandra.thrift.ThriftValidationTest.java (2012-07-30)
@@ -20,11 +20,10 @@ package org.apache.cassandra.thrift;
  *
  */
 
-
-import java.util.Arrays;
-
 import org.junit.Test;
 
+import java.util.Collections;
+
 import org.apache.cassandra.SchemaLoader;
 import org.apache.cassandra.config.*;
 import org.apache.cassandra.db.marshal.AsciiType;
@@ -56,7 +55,7 @@ public class ThriftValidationTest extends SchemaLoader
         boolean gotException = false;
 
         // add a key_alias = "id"
-        newMetadata.keyAliases(Arrays.asList(AsciiType.instance.decompose("id")));
+        newMetadata.keyAliases(Collections.singletonList(AsciiType.instance.decompose("id")));
 
         // should not throw IRE here
         try
Project apache/mahout in file ...der.AllUnknownItemsCandidateItemsStrategyTest.java (2013-06-05)
@@ -28,7 +28,7 @@ import org.apache.mahout.cf.taste.recommender.CandidateItemsStrategy;
 import org.easymock.EasyMock;
 import org.junit.Test;
 
-import java.util.Arrays;
+import java.util.Collections;
 
 /**
  * Tests {@link AllUnknownItemsCandidateItemsStrategyTest}
@@ -47,7 +47,7 @@ public final class AllUnknownItemsCandidateItemsStrategyTest extends TasteTestCa
     EasyMock.expect(dataModel.getNumItems()).andReturn(3);
     EasyMock.expect(dataModel.getItemIDs()).andReturn(allItemIDs.iterator());
 
-    PreferenceArray prefArrayOfUser123 = new GenericUserPreferenceArray(Arrays.asList(
+    PreferenceArray prefArrayOfUser123 = new GenericUserPreferenceArray(Collections.singletonList(
         new GenericPreference(123L, 2L, 1.0f)));
 
     CandidateItemsStrategy strategy = new AllUnknownItemsCandidateItemsStrategy();
Project apache/mahout in file ...edItemsNeighborhoodCandidateItemsStrategyTest.java (2013-06-05)
@@ -17,7 +17,7 @@
 
 package org.apache.mahout.cf.taste.impl.recommender;
 
-import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 import com.google.common.collect.Lists;
@@ -59,7 +59,7 @@ public final class PreferredItemsNeighborhoodCandidateItemsStrategyTest extends
     EasyMock.expect(dataModel.getItemIDsFromUser(456L)).andReturn(itemIDsFromUser456);
 
     PreferenceArray prefArrayOfUser123 =
-        new GenericUserPreferenceArray(Arrays.asList(new GenericPreference(123L, 1L, 1.0f)));
+        new GenericUserPreferenceArray(Collections.singletonList(new GenericPreference(123L, 1L, 1.0f)));
 
     CandidateItemsStrategy strategy = new PreferredItemsNeighborhoodCandidateItemsStrategy();