com.google.common.collect.Lists



Project SonarSource/sonarqube in file ...g.sonar.plugins.findbugs.FindbugsExecutorTest.java (2012-05-24)
@@ -19,14 +19,7 @@
  */
 package org.sonar.plugins.findbugs;
 
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-import static org.junit.internal.matchers.StringContains.containsString;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.io.File;
-
+import com.google.common.collect.Lists;
 import org.apache.commons.io.FileUtils;
 import org.junit.Test;
 import org.sonar.api.CoreProperties;
@@ -34,6 +27,14 @@ import org.sonar.api.resources.Project;
 import org.sonar.api.resources.ProjectFileSystem;
 import org.sonar.api.utils.SonarException;
 
+import java.io.File;
+
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.internal.matchers.StringContains.containsString;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
 public class FindbugsExecutorTest {
 
   @Test
@@ -78,6 +79,7 @@ public class FindbugsExecutorTest {
     when(conf.getFindbugsProject()).thenReturn(project);
     when(conf.saveExcludeConfigXml()).thenReturn(new File("test-resources/findbugs-exclude.xml"));
     when(conf.saveIncludeConfigXml()).thenReturn(new File("test-resources/findbugs-include.xml"));
+    when(conf.getExcludesFilters()).thenReturn(Lists.newArrayList(new File("test-resources/findbugs-exclude.xml"), new File("test-resources/fake-file.xml")));
     when(conf.getEffort()).thenReturn("default");
     when(conf.getTimeout()).thenReturn(CoreProperties.FINDBUGS_TIMEOUT_DEFAULT_VALUE);
     return conf;
Project elasticsearch/elasticsearch in file ...n.java.org.elasticsearch.common.lucene.Lucene.java (2015-02-20)
@@ -20,6 +20,7 @@
 package org.elasticsearch.common.lucene;
 
 import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
 import org.apache.lucene.analysis.core.KeywordAnalyzer;
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
 import org.apache.lucene.codecs.CodecUtil;
@@ -120,6 +121,7 @@ public class Lucene {
      */
     public static Iterable<String> files(SegmentInfos infos) throws IOException {
         final List<Collection<String>> list = new ArrayList<>();
+        list.add(Collections.singleton(infos.getSegmentsFileName()));
         for (SegmentCommitInfo info : infos) {
             list.add(info.files());
         }
Project Athou/commafeed in file ...a.com.commafeed.backend.model.FeedEntryStatus.java (2013-10-20)
@@ -20,6 +20,8 @@ import lombok.Setter;
 import org.hibernate.annotations.Cache;
 import org.hibernate.annotations.CacheConcurrencyStrategy;
 
+import com.google.common.collect.Lists;
+
 @Entity
 @Table(name = "FEEDENTRYSTATUSES")
 @SuppressWarnings("serial")
@@ -45,7 +47,7 @@ public class FeedEntryStatus extends AbstractModel {
 	private boolean markable;
 	
 	@Transient
-	private List<FeedEntryTag> tags;
+	private List<FeedEntryTag> tags = Lists.newArrayList();
 
 	/**
 	 * Denormalization starts here
Project Athou/commafeed in file ...ava.com.commafeed.frontend.rest.model.Entries.java (2013-03-22)
@@ -2,9 +2,11 @@ package com.commafeed.frontend.rest.model;
 
 import java.util.List;
 
+import com.google.common.collect.Lists;
+
 public class Entries {
 	private String name;
-	private List<Entry> entries;
+	private List<Entry> entries = Lists.newArrayList();
 
 	public String getName() {
 		return name;
Project Graylog2/graylog2-server in file ...7f82/src.main.java.org.graylog2.Configuration.java (2012-04-30)
@@ -34,6 +34,7 @@ import com.github.joschi.jadconfig.converters.StringListConverter;
 import com.github.joschi.jadconfig.validators.InetPortValidator;
 import com.github.joschi.jadconfig.validators.PositiveIntegerValidator;
 import com.github.joschi.jadconfig.validators.PositiveLongValidator;
+import com.google.common.collect.Lists;
 import com.mongodb.ServerAddress;
 
 /**
@@ -249,7 +250,7 @@ public class Configuration {
     }
 
     public List<ServerAddress> getMongoReplicaSet() {
-        List<ServerAddress> replicaServers = new ArrayList<ServerAddress>();
+        List<ServerAddress> replicaServers = Lists.newArrayList();
 
         List<String> rawSet = mongoReplicaSet;