com.google.common.collect.Maps



Project Graylog2/graylog2-server in file .../src.test.java.org.graylog2.ConfigurationTest.java (2012-04-30)
@@ -15,6 +15,7 @@ import com.github.joschi.jadconfig.JadConfig;
 import com.github.joschi.jadconfig.RepositoryException;
 import com.github.joschi.jadconfig.ValidationException;
 import com.github.joschi.jadconfig.repositories.InMemoryRepository;
+import com.google.common.collect.Maps;
 
 /**
  * Unit tests for {@link Configuration} class
@@ -29,7 +30,7 @@ public class ConfigurationTest {
     @Before
     public void setUp() {
 
-        validProperties = new HashMap<String, String>();
+        validProperties = Maps.newHashMap();
 
         try {
             tempFile = File.createTempFile("graylog", null);
Project Graylog2/graylog2-server in file ....graylog2.streams.matchers.MessageMatcherTest.java (2012-04-30)
@@ -23,6 +23,8 @@ package org.graylog2.streams.matchers;
 import org.graylog2.logmessage.LogMessage;
 import java.util.Map;
 import org.bson.types.ObjectId;
+
+import com.google.common.collect.Maps;
 import com.mongodb.BasicDBObject;
 import java.util.HashMap;
 import org.graylog2.streams.StreamRule;
@@ -80,7 +82,7 @@ public class MessageMatcherTest {
      */
     @Test
     public void testSpecificMatches() {
-        Map<String, String> cases = new HashMap<String, String>();
+        Map<String, String> cases = Maps.newHashMap();
 
         cases.put("su: (to myuser) root on none", "(su|sudo).+"); // http://jira.graylog2.org/browse/SERVER-11
         cases.put("MyHostname su: (to myuser) root on none\n", ".+su.+"); // http://jira.graylog2.org/browse/SERVER-11
Project JetBrains/intellij-community in file ...ins.python.run.AbstractPythonRunConfiguration.java (2010-10-21)
@@ -1,5 +1,6 @@
 package com.jetbrains.python.run;
 
+import com.google.common.collect.Maps;
 import com.intellij.execution.configuration.EnvironmentVariablesComponent;
 import com.intellij.execution.configurations.*;
 import com.intellij.openapi.module.Module;
@@ -33,7 +34,7 @@ public abstract class AbstractPythonRunConfiguration extends ModuleBasedConfigur
   private String myWorkingDirectory = "";
   private String mySdkHome = "";
   private boolean myPassParentEnvs = true;
-  private Map<String, String> myEnvs = new HashMap<String, String>();
+  private Map<String, String> myEnvs = Maps.newHashMap();
   private boolean myUseModuleSdk;
 
   public AbstractPythonRunConfiguration(final String name, final RunConfigurationModule module, final ConfigurationFactory factory) {
Project JetBrains/kotlin in file ....jetbrains.jet.lang.resolve.WritableScopeImpl.java (2011-05-11)
@@ -1,5 +1,6 @@
 package org.jetbrains.jet.lang.resolve;
 
+import com.google.common.collect.Maps;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.jetbrains.jet.lang.ErrorHandler;
@@ -244,7 +245,7 @@ public class WritableScopeImpl extends WritableScopeWithImports {
     @NotNull
     public Map<String, NamespaceDescriptor> getNamespaceDescriptors() {
         if (namespaceDescriptors == null) {
-            namespaceDescriptors = new HashMap<String, NamespaceDescriptor>();
+            namespaceDescriptors = Maps.newHashMap();
         }
         return namespaceDescriptors;
     }
Project SonarSource/sonarqube in file ...onar.plugins.core.sensors.ViolationsDecorator.java (2010-12-06)
@@ -20,6 +20,7 @@
 package org.sonar.plugins.core.sensors;
 
 import com.google.common.collect.HashMultiset;
+import com.google.common.collect.Maps;
 import com.google.common.collect.Multiset;
 import org.sonar.api.batch.*;
 import org.sonar.api.measures.*;
@@ -38,7 +39,7 @@ public class ViolationsDecorator implements Decorator {
   // temporary data for current resource
   private Multiset<Rule> rules = HashMultiset.create();
   private Multiset<RulePriority> priorities = HashMultiset.create();
-  private Map<Rule, RulePriority> ruleToLevel = new HashMap<Rule, RulePriority>();
+  private Map<Rule, RulePriority> ruleToLevel = Maps.newHashMap();
   private int total = 0;
 
   public boolean shouldExecuteOnProject(Project project) {