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;
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() {
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;
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) {
*/
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;
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) {
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;
}
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);
}
}
private void validateKeyPattern(@Nullable Long templateId, @Nullable String keyPattern) {
- if (StringUtils.isNullOrEmpty(keyPattern)) {
+ if (StringUtils.isEmpty(keyPattern)) {
return;
}
try {
*/
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;
@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");