aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSébastien Lesaint <sns-seb@users.noreply.github.com>2015-06-19 16:02:40 +0200
committerSébastien Lesaint <sns-seb@users.noreply.github.com>2015-06-19 16:02:40 +0200
commitf03ce16fbade17fabd9e44726de6bf99f933c7a9 (patch)
treead83b501b348956c5cc386d04449819bae4d51af /sonar-batch
parentd7e2e31271ec68436da21e077261d1e367f56809 (diff)
parent6f7dcf0f6ad046940c37a14041e2ddd02c457776 (diff)
downloadsonarqube-f03ce16fbade17fabd9e44726de6bf99f933c7a9.tar.gz
sonarqube-f03ce16fbade17fabd9e44726de6bf99f933c7a9.zip
Merge pull request #366 from gliptak/warnings1
Cleanup warnings
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/ProjectFileSystemAdapter.java4
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/sensor/DefaultSensorContext.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/sensor/DefaultSensorStorage.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/DefaultModuleFileSystemTest.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ProjectFileSystemAdapterTest.java2
5 files changed, 6 insertions, 6 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/ProjectFileSystemAdapter.java b/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/ProjectFileSystemAdapter.java
index 1254f67e315..6bef676b656 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/ProjectFileSystemAdapter.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/ProjectFileSystemAdapter.java
@@ -116,7 +116,7 @@ public class ProjectFileSystemAdapter implements ProjectFileSystem {
@Override
public File getSonarWorkingDirectory() {
- return target.workingDir();
+ return target.workDir();
}
@Override
@@ -165,7 +165,7 @@ public class ProjectFileSystemAdapter implements ProjectFileSystem {
@Override
public File writeToWorkingDirectory(String content, String fileName) throws IOException {
- File file = new File(target.workingDir(), fileName);
+ File file = new File(target.workDir(), fileName);
FileUtils.writeStringToFile(file, content, CharEncoding.UTF_8);
return file;
}
diff --git a/sonar-batch/src/main/java/org/sonar/batch/sensor/DefaultSensorContext.java b/sonar-batch/src/main/java/org/sonar/batch/sensor/DefaultSensorContext.java
index d0f6f4f6fcc..57197abc0a1 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/sensor/DefaultSensorContext.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/sensor/DefaultSensorContext.java
@@ -76,7 +76,7 @@ public class DefaultSensorContext implements SensorContext {
@Override
public <G extends Serializable> NewMeasure<G> newMeasure() {
- return new DefaultMeasure(sensorStorage);
+ return new DefaultMeasure<G>(sensorStorage);
}
@Override
diff --git a/sonar-batch/src/main/java/org/sonar/batch/sensor/DefaultSensorStorage.java b/sonar-batch/src/main/java/org/sonar/batch/sensor/DefaultSensorStorage.java
index 208dc809210..b97c94f492b 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/sensor/DefaultSensorStorage.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/sensor/DefaultSensorStorage.java
@@ -102,7 +102,7 @@ public class DefaultSensorStorage implements SensorStorage {
@Override
public void store(Measure newMeasure) {
- DefaultMeasure measure = (DefaultMeasure) newMeasure;
+ DefaultMeasure<?> measure = (DefaultMeasure<?>) newMeasure;
org.sonar.api.measures.Metric m = findMetricOrFail(measure.metric().key());
org.sonar.api.measures.Measure measureToSave = new org.sonar.api.measures.Measure(m);
setValueAccordingToMetricType(newMeasure, m, measureToSave);
diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/DefaultModuleFileSystemTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/DefaultModuleFileSystemTest.java
index e1c0eb4c65e..4a5e04b4a8e 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/DefaultModuleFileSystemTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/DefaultModuleFileSystemTest.java
@@ -123,7 +123,7 @@ public class DefaultModuleFileSystemTest {
new Project("foo"), settings, fileIndexer, initializer, componentIndexer);
assertThat(fs.baseDir().getCanonicalPath()).isEqualTo(basedir.getCanonicalPath());
- assertThat(fs.workingDir().getCanonicalPath()).isEqualTo(workingDir.getCanonicalPath());
+ assertThat(fs.workDir().getCanonicalPath()).isEqualTo(workingDir.getCanonicalPath());
assertThat(fs.buildDir().getCanonicalPath()).isEqualTo(buildDir.getCanonicalPath());
assertThat(fs.sourceDirs()).hasSize(2);
assertThat(fs.testDirs()).hasSize(1);
diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ProjectFileSystemAdapterTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ProjectFileSystemAdapterTest.java
index 67e450093a2..c75ad09cc0b 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ProjectFileSystemAdapterTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ProjectFileSystemAdapterTest.java
@@ -63,7 +63,7 @@ public class ProjectFileSystemAdapterTest {
public void should_create_default_build_dir() throws IOException {
File workingDir = temp.newFile("work");
DefaultModuleFileSystem target = mock(DefaultModuleFileSystem.class);
- when(target.workingDir()).thenReturn(workingDir);
+ when(target.workDir()).thenReturn(workingDir);
ProjectFileSystemAdapter adapter = new ProjectFileSystemAdapter(target, new Project("my-project"));
File buildDir = adapter.getBuildDir();