aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-06-10 21:24:42 +0200
committersimonbrandhof <simon.brandhof@gmail.com>2011-06-10 21:24:42 +0200
commitc257dc801bcb060cb9a5c2f8c516607721bc57e4 (patch)
tree8c857b880d3ddade7539961514c98c0daf4235df /sonar-batch
parent1e70730eb52a9e6597666ab0a89d88a4eaec471e (diff)
downloadsonarqube-c257dc801bcb060cb9a5c2f8c516607721bc57e4.tar.gz
sonarqube-c257dc801bcb060cb9a5c2f8c516607721bc57e4.zip
Fix some minor violations
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/ArtifactDownloader.java5
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchModuleTest.java27
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapClassLoaderTest.java3
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/ModuleTest.java3
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/ProjectExtensionInstallerTest.java3
5 files changed, 6 insertions, 35 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ArtifactDownloader.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ArtifactDownloader.java
index 946df51833e..aeb872d3a24 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ArtifactDownloader.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ArtifactDownloader.java
@@ -54,7 +54,7 @@ public class ArtifactDownloader implements BatchComponent {
String url = baseUrl + "/deploy/jdbc-driver.jar";
try {
File jdbcDriver = new File(workingDirectories.getRoot(), "jdbc-driver.jar");
- LOG.info("Download JDBC driver to " + jdbcDriver);
+ LOG.debug("Downloading JDBC driver to " + jdbcDriver);
httpDownloader.download(new URI(url), jdbcDriver);
return jdbcDriver;
@@ -67,7 +67,7 @@ public class ArtifactDownloader implements BatchComponent {
try {
File targetDir = workingDirectories.getDir("plugins/" + remote.getKey());
FileUtils.forceMkdir(targetDir);
- LOG.info("Downloading plugin " + remote.getKey() + " into " + targetDir);
+ LOG.debug("Downloading plugin " + remote.getKey() + " into " + targetDir);
List<File> files = Lists.newArrayList();
for (String filename : remote.getFilenames()) {
@@ -88,6 +88,7 @@ public class ArtifactDownloader implements BatchComponent {
public List<RemotePlugin> downloadPluginIndex() {
String url = baseUrl + "/deploy/plugins/index.txt";
try {
+ LOG.debug("Downloading index of plugins");
String indexContent = httpDownloader.downloadPlainText(new URI(url), "UTF-8");
String[] rows = StringUtils.split(indexContent, CharUtils.LF);
List<RemotePlugin> remoteLocations = Lists.newArrayList();
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchModuleTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchModuleTest.java
deleted file mode 100644
index 6b6c14a65cd..00000000000
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchModuleTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2011 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.batch.bootstrap;
-
-import org.junit.Ignore;
-
-@Ignore
-public class BatchModuleTest {
-
-}
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapClassLoaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapClassLoaderTest.java
index dfee29db761..81790aeb189 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapClassLoaderTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapClassLoaderTest.java
@@ -24,7 +24,6 @@ import org.junit.Test;
import java.io.File;
import java.net.URISyntaxException;
import java.net.URL;
-import java.util.Arrays;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
@@ -40,6 +39,6 @@ public class BootstrapClassLoaderTest {
JdbcDriverHolder classloader = new JdbcDriverHolder(new File(url.toURI()));
assertNotNull(classloader.getClassLoader());
assertNotNull(classloader.getClassLoader().getResource("foo/foo.txt"));
-
+
}
}
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ModuleTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ModuleTest.java
index e85a72ecfad..60fc585dd0b 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ModuleTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ModuleTest.java
@@ -21,7 +21,6 @@ package org.sonar.batch.bootstrap;
import org.hamcrest.Matchers;
import org.junit.Test;
-import org.sonar.batch.bootstrap.Module;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue;
@@ -69,7 +68,7 @@ public class ModuleTest {
public void componentsShouldBeSingletons() {
Module module = new FakeModule(FakeService.class).init();
- assertThat(module.getComponent(FakeService.class)==module.getComponent(FakeService.class), is(true));
+ assertThat(module.getComponent(FakeService.class) == module.getComponent(FakeService.class), is(true));
}
@Test
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ProjectExtensionInstallerTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ProjectExtensionInstallerTest.java
index 12915c409d9..b8020422a15 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ProjectExtensionInstallerTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ProjectExtensionInstallerTest.java
@@ -25,7 +25,6 @@ import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.maven.project.MavenProject;
import org.junit.Test;
import org.sonar.api.*;
-import org.sonar.api.batch.AbstractCoverageExtension;
import org.sonar.api.batch.CoverageExtension;
import org.sonar.api.batch.InstantiationStrategy;
import org.sonar.api.batch.SupportedEnvironment;
@@ -104,7 +103,7 @@ public class ProjectExtensionInstallerTest {
private static Project newJavaProject(Configuration conf) {
Project project = new Project("foo").setLanguageKey(Java.KEY).setAnalysisType(Project.AnalysisType.DYNAMIC);
- project.setConfiguration(conf!=null ? conf : new PropertiesConfiguration());
+ project.setConfiguration(conf != null ? conf : new PropertiesConfiguration());
return project;
}