aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-07-01 13:43:04 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-07-01 13:51:23 +0200
commitef3e590d1ba5372d825216f85816463fa8e50a99 (patch)
treed43b93223e5440c3f4d8582eae406ff9863cc8a5 /sonar-batch
parentcbe3819ae9e045049816761ff598ae5e74eac2e2 (diff)
downloadsonarqube-ef3e590d1ba5372d825216f85816463fa8e50a99.tar.gz
sonarqube-ef3e590d1ba5372d825216f85816463fa8e50a99.zip
Fix some quality flaws
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/DefaultPluginsReferential.java3
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/languages/package-info.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/phases/GraphPersister.java1
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/rules/package-info.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/DefaultModuleFileSystem.java9
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan2/package-info.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/settings/package-info.java2
7 files changed, 11 insertions, 10 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/DefaultPluginsReferential.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/DefaultPluginsReferential.java
index 4d3c8d30d64..1332f59b062 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/DefaultPluginsReferential.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/DefaultPluginsReferential.java
@@ -55,7 +55,7 @@ public class DefaultPluginsReferential implements PluginsReferential {
public File pluginFile(final RemotePlugin remote) {
try {
final RemotePluginFile file = remote.file();
- File cachedFile = fileCache.get(file.getFilename(), file.getHash(), new FileCache.Downloader() {
+ return fileCache.get(file.getFilename(), file.getHash(), new FileCache.Downloader() {
public void download(String filename, File toFile) throws IOException {
String url = "/deploy/plugins/" + remote.getKey() + "/" + file.getFilename();
if (LOG.isDebugEnabled()) {
@@ -66,7 +66,6 @@ public class DefaultPluginsReferential implements PluginsReferential {
server.download(url, toFile);
}
});
- return cachedFile;
} catch (Exception e) {
throw new IllegalStateException("Fail to download plugin: " + remote.getKey(), e);
diff --git a/sonar-batch/src/main/java/org/sonar/batch/languages/package-info.java b/sonar-batch/src/main/java/org/sonar/batch/languages/package-info.java
index ef8790b337f..7a5d7a96ff6 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/languages/package-info.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/languages/package-info.java
@@ -18,4 +18,4 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@javax.annotation.ParametersAreNonnullByDefault
-package org.sonar.batch.languages; \ No newline at end of file
+package org.sonar.batch.languages;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/phases/GraphPersister.java b/sonar-batch/src/main/java/org/sonar/batch/phases/GraphPersister.java
index 3fc0f17db9a..32b26389862 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/phases/GraphPersister.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/phases/GraphPersister.java
@@ -32,7 +32,6 @@ import org.sonar.core.graph.graphson.GraphsonMode;
import org.sonar.core.graph.graphson.GraphsonWriter;
import org.sonar.core.graph.jdbc.GraphDto;
import org.sonar.core.graph.jdbc.GraphDtoMapper;
-import org.sonar.core.persistence.BatchSession;
import org.sonar.core.persistence.DbSession;
import org.sonar.core.persistence.MyBatis;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/rules/package-info.java b/sonar-batch/src/main/java/org/sonar/batch/rules/package-info.java
index 819e886c070..1522091f4eb 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/rules/package-info.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/rules/package-info.java
@@ -18,4 +18,4 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@javax.annotation.ParametersAreNonnullByDefault
-package org.sonar.batch.rules; \ No newline at end of file
+package org.sonar.batch.rules;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/DefaultModuleFileSystem.java b/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/DefaultModuleFileSystem.java
index 7205c1c483f..0e534a334f9 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/DefaultModuleFileSystem.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/DefaultModuleFileSystem.java
@@ -70,17 +70,20 @@ public class DefaultModuleFileSystem extends DefaultFileSystem implements Module
/**
* Used by scan2
*/
- public DefaultModuleFileSystem(ModuleInputFileCache moduleInputFileCache, ProjectDefinition def, Settings settings, FileIndexer indexer, ModuleFileSystemInitializer initializer) {
+ public DefaultModuleFileSystem(ModuleInputFileCache moduleInputFileCache, ProjectDefinition def, Settings settings,
+ FileIndexer indexer, ModuleFileSystemInitializer initializer) {
this(moduleInputFileCache, def.getKey(), settings, indexer, initializer, null);
}
- public DefaultModuleFileSystem(ModuleInputFileCache moduleInputFileCache, ProjectDefinition def, Project project, Settings settings, FileIndexer indexer,
+ public DefaultModuleFileSystem(ModuleInputFileCache moduleInputFileCache, ProjectDefinition def, Project project,
+ Settings settings, FileIndexer indexer,
ModuleFileSystemInitializer initializer,
ComponentIndexer componentIndexer) {
this(moduleInputFileCache, project.getKey(), settings, indexer, initializer, componentIndexer);
}
- private DefaultModuleFileSystem(ModuleInputFileCache moduleInputFileCache, String moduleKey, Settings settings, FileIndexer indexer, ModuleFileSystemInitializer initializer,
+ private DefaultModuleFileSystem(ModuleInputFileCache moduleInputFileCache, String moduleKey, Settings settings,
+ FileIndexer indexer, ModuleFileSystemInitializer initializer,
@Nullable ComponentIndexer componentIndexer) {
super(moduleInputFileCache);
this.componentIndexer = componentIndexer;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan2/package-info.java b/sonar-batch/src/main/java/org/sonar/batch/scan2/package-info.java
index d5d167bf737..62ae62716bb 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan2/package-info.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/scan2/package-info.java
@@ -18,4 +18,4 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@javax.annotation.ParametersAreNonnullByDefault
-package org.sonar.batch.scan2; \ No newline at end of file
+package org.sonar.batch.scan2;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/settings/package-info.java b/sonar-batch/src/main/java/org/sonar/batch/settings/package-info.java
index 6d2df16d3ab..7e52b5b6d3e 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/settings/package-info.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/settings/package-info.java
@@ -18,4 +18,4 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@javax.annotation.ParametersAreNonnullByDefault
-package org.sonar.batch.settings; \ No newline at end of file
+package org.sonar.batch.settings;