java.util.Collectionscom.google.common.collect.ImmutableList



Project druid-io/druid in file ...m.metamx.druid.indexer.data.MapInputRowParser.java (2013-08-11)
@@ -2,13 +2,13 @@ package com.metamx.druid.indexer.data;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import com.metamx.druid.input.InputRow;
 import com.metamx.druid.input.MapBasedInputRow;
 import org.joda.time.DateTime;
 
-import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -28,7 +28,7 @@ public class MapInputRowParser implements InputRowParser<Map<String, Object>>
   {
     this.timestampSpec = timestampSpec;
     if (dimensions != null) {
-      this.dimensions = Collections.unmodifiableList(Lists.newArrayList(dimensions));
+       this.dimensions = ImmutableList.copyOf(dimensions);
     }
     this.dimensionExclusions = Sets.newHashSet();
     if (dimensionExclusions != null) {
Project jclouds/jclouds in file ...oudloadbalancers.features.NodeAsyncClientTest.java (2012-10-20)
@@ -20,7 +20,6 @@ package org.jclouds.cloudloadbalancers.features;
 
 import java.io.IOException;
 import java.lang.reflect.Method;
-import java.util.Collections;
 import java.util.Set;
 
 import org.jclouds.cloudloadbalancers.domain.NodeAttributes;
@@ -38,6 +37,7 @@ import org.jclouds.rest.functions.ReturnVoidOnNotFoundOr404;
 import org.jclouds.rest.internal.RestAnnotationProcessor;
 import org.testng.annotations.Test;
 
+import com.google.common.collect.ImmutableList;
 import com.google.inject.TypeLiteral;
 
 /**
@@ -85,7 +85,7 @@ public class NodeAsyncClientTest extends BaseCloudLoadBalancersAsyncClientTest<N
 
    public void createNodesInLoadBalancerWithType() throws SecurityException, NoSuchMethodException, IOException {
       Method method = NodeAsyncClient.class.getMethod("createNodesInLoadBalancer", Set.class, int.class);
-      HttpRequest httpRequest = processor.createRequest(method, Collections.<NodeRequest>singleton(NodeRequest.builder().
+      HttpRequest httpRequest = processor.createRequest(method, ImmutableList.<NodeRequest>of(NodeRequest.builder().
     		  address("192.168.1.1").port(8080).build()), 3);
 
       assertRequestLineEquals(httpRequest,
Project jclouds/jclouds in file ...ain.java.org.jclouds.concurrent.MoreExecutors.java (2012-10-20)
@@ -34,7 +34,6 @@
 
 package org.jclouds.concurrent;
 
-import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.AbstractExecutorService;
 import java.util.concurrent.ExecutorService;
@@ -46,6 +45,7 @@ import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 
 import com.google.common.annotations.Beta;
+import com.google.common.collect.ImmutableList;
 
 /**
  * functions related to or replacing those in
@@ -146,7 +146,7 @@ public class MoreExecutors {
       @Override
       public List<Runnable> shutdownNow() {
          shutdown();
-         return Collections.emptyList();
+         return ImmutableList.of();
       }
 
       @Override
Project jclouds/jclouds in file ...in.UnregisterMachineIfExistsAndDeleteItsMedia.java (2012-10-20)
@@ -41,7 +41,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
 import static com.google.common.collect.Iterables.filter;
 import static com.google.common.collect.Iterables.transform;
 
-import java.util.Collections;
 import java.util.List;
 
 import javax.annotation.Resource;
@@ -62,6 +61,7 @@ import org.virtualbox_4_1.VBoxException;
 import com.google.common.base.Function;
 import com.google.common.base.Predicate;
 import com.google.common.base.Throwables;
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 
 @Singleton
@@ -79,7 +79,7 @@ public class UnregisterMachineIfExistsAndDeleteItsMedia implements Function<IMac
 
    @Override
    public Void apply(IMachine machine) {
-      List<IMedium> mediaToBeDeleted = Collections.emptyList();
+      List<IMedium> mediaToBeDeleted = ImmutableList.of();
       try {
          mediaToBeDeleted = machine.unregister(vmSpec.getCleanupMode());
       } catch (VBoxException e) {
Project jclouds/jclouds in file ...registerMachineIfExistsAndForceDeleteItsMedia.java (2012-10-20)
@@ -40,7 +40,6 @@ package org.jclouds.virtualbox.functions.admin;
 import static com.google.common.base.Preconditions.checkNotNull;
 import static com.google.common.collect.Iterables.transform;
 
-import java.util.Collections;
 import java.util.List;
 
 import javax.annotation.Resource;
@@ -59,6 +58,7 @@ import org.virtualbox_4_1.VBoxException;
 
 import com.google.common.base.Function;
 import com.google.common.base.Throwables;
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 
 @Singleton
@@ -70,7 +70,7 @@ public class UnregisterMachineIfExistsAndForceDeleteItsMedia implements Function
 
    @Override
    public Void apply(IMachine machine) {
-      List<IMedium> mediaToBeDeleted = Collections.emptyList();
+      List<IMedium> mediaToBeDeleted = ImmutableList.of();
       try {
          mediaToBeDeleted = machine.unregister(CleanupMode.Full);
       } catch (VBoxException e) {