]> source.dussan.org Git - sonarqube.git/commitdiff
Fix incorrect imports
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 3 Dec 2013 21:51:08 +0000 (22:51 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 3 Dec 2013 21:51:08 +0000 (22:51 +0100)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/InitialOpenIssuesStack.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/InitialOpenIssuesStackTest.java
sonar-batch/src/test/java/org/sonar/batch/index/CachesTest.java
sonar-server/src/main/java/org/sonar/server/permission/InternalPermissionTemplateService.java
sonar-server/src/test/java/org/sonar/server/issue/IssueChangelogServiceTest.java

index 7fc7cd6232e55b6ab775ae82185f0561b31c4800..10a41111771b1a27ad6305f3c647850614173b94 100644 (file)
@@ -20,7 +20,7 @@
 
 package org.sonar.plugins.core.issue;
 
-import edu.emory.mathcs.backport.java.util.Collections;
+import java.util.Collections;
 import org.sonar.api.BatchExtension;
 import org.sonar.api.batch.InstantiationStrategy;
 import org.sonar.batch.index.Cache;
@@ -75,7 +75,7 @@ public class InitialOpenIssuesStack implements BatchExtension {
 
   public List<IssueChangeDto> selectChangelog(String issueKey) {
     List<IssueChangeDto> changeDtos = issuesChangelogCache.get(issueKey);
-    return changeDtos != null ? changeDtos : Collections.emptyList();
+    return changeDtos != null ? changeDtos : Collections.<IssueChangeDto>emptyList();
   }
 
   public void clear() {
index 590f9bd5e84f2e9c2eb49dd4e0771651bb4b50df..a32ea0bb51dc72b00d03192958d8b32722ae5736 100644 (file)
@@ -20,7 +20,7 @@
 
 package org.sonar.plugins.core.issue;
 
-import edu.emory.mathcs.backport.java.util.Collections;
+import java.util.Collections;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.ClassRule;
@@ -45,7 +45,9 @@ public class InitialOpenIssuesStackTest {
   public static TemporaryFolder temp = new TemporaryFolder();
 
   public static Caches createCacheOnTemp(TemporaryFolder temp) {
-    BootstrapSettings bootstrapSettings = new BootstrapSettings(new BootstrapProperties(Collections.emptyMap()));
+    BootstrapSettings bootstrapSettings = new BootstrapSettings(
+      new BootstrapProperties(Collections.<String,String>emptyMap())
+    );
     try {
       bootstrapSettings.properties().put(CoreProperties.WORKING_DIRECTORY, temp.newFolder().getAbsolutePath());
     } catch (IOException e) {
index c8d5fc7dc0e805e058362d258c8306649acd3560..2e206f93071a4e1d55caafbcfc44f7309bbd3460 100644 (file)
@@ -19,7 +19,7 @@
  */
 package org.sonar.batch.index;
 
-import edu.emory.mathcs.backport.java.util.Collections;
+import java.util.Collections;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.ClassRule;
@@ -43,7 +43,9 @@ public class CachesTest {
   public static TemporaryFolder temp = new TemporaryFolder();
 
   public static Caches createCacheOnTemp(TemporaryFolder temp) {
-    BootstrapSettings bootstrapSettings = new BootstrapSettings(new BootstrapProperties(Collections.emptyMap()));
+    BootstrapSettings bootstrapSettings = new BootstrapSettings(
+      new BootstrapProperties(Collections.<String,String>emptyMap())
+    );
     try {
       bootstrapSettings.properties().put(CoreProperties.WORKING_DIRECTORY, temp.newFolder().getAbsolutePath());
     } catch (IOException e) {
index 3dee4ad4a7900202120f67f1f6c4230dfe3474b6..1a92f1ee1db9ef63fbcc3885aebefb559bb840e7 100644 (file)
@@ -21,7 +21,7 @@
 package org.sonar.server.permission;
 
 import com.google.common.collect.Lists;
-import org.h2.util.StringUtils;
+import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.sonar.api.ServerComponent;
@@ -146,7 +146,7 @@ public class InternalPermissionTemplateService implements ServerComponent {
   }
 
   private void validateTemplateName(@Nullable Long templateId, String templateName) {
-    if (StringUtils.isNullOrEmpty(templateName)) {
+    if (StringUtils.isEmpty(templateName)) {
       String errorMsg = "Name can't be blank";
       throw new BadRequestException(errorMsg);
     }
@@ -162,7 +162,7 @@ public class InternalPermissionTemplateService implements ServerComponent {
   }
 
   private void validateKeyPattern(@Nullable Long templateId, @Nullable String keyPattern) {
-    if (StringUtils.isNullOrEmpty(keyPattern)) {
+    if (StringUtils.isEmpty(keyPattern)) {
       return;
     }
     try {
index 2d5a2e6ef3b0db5b498b5bcd8cc13ad499612034..18e20875ed8a5febe0575e67f1e407bab4192ae8 100644 (file)
@@ -19,7 +19,7 @@
  */
 package org.sonar.server.issue;
 
-import edu.emory.mathcs.backport.java.util.Collections;
+import java.util.Collections;
 import org.junit.Test;
 import org.sonar.api.issue.Issue;
 import org.sonar.api.issue.IssueQuery;
@@ -70,7 +70,7 @@ public class IssueChangelogServiceTest {
   @Test
   public void not_load_changelog_on_unkown_issue() throws Exception {
     try {
-      IssueQueryResult issueQueryResult = new DefaultIssueQueryResult(Collections.emptyList());
+      IssueQueryResult issueQueryResult = new DefaultIssueQueryResult(Collections.<Issue>emptyList());
       when(issueFinder.find(any(IssueQuery.class))).thenReturn(issueQueryResult);
 
       service.changelog("ABCDE");