aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2014-02-27 13:37:22 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2014-02-27 13:38:19 +0100
commitbf78055b3e3d021782a727a8072682d64f1e2a4a (patch)
treecc402792322b9cd75038a533c89b65a3b40742c0 /sonar-batch
parent462f3c3a33e6f2f85b068ce4c164a14d2569ed5d (diff)
downloadsonarqube-bf78055b3e3d021782a727a8072682d64f1e2a4a.tar.gz
sonarqube-bf78055b3e3d021782a727a8072682d64f1e2a4a.zip
Deprecate remaining Java-specific stuff
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/index/ResourceKeyMigration.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/ComponentIndexer.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/InputFileBuilder.java3
3 files changed, 3 insertions, 4 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/ResourceKeyMigration.java b/sonar-batch/src/main/java/org/sonar/batch/index/ResourceKeyMigration.java
index 334b9c1f98c..c113b5edbdf 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/index/ResourceKeyMigration.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/index/ResourceKeyMigration.java
@@ -109,7 +109,7 @@ public class ResourceKeyMigration implements BatchComponent {
// Now compute migration of the parent dir
String oldKey = StringUtils.substringAfterLast(oldEffectiveKey, ":");
Resource sonarFile;
- if (Java.KEY.equals(resourceModel.getLanguageKey())) {
+ if ("java".equals(resourceModel.getLanguageKey())) {
sonarFile = new JavaFile(oldKey);
} else {
sonarFile = new File(oldKey);
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/ComponentIndexer.java b/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/ComponentIndexer.java
index bf169d2b7d7..aa3ed738920 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/ComponentIndexer.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/ComponentIndexer.java
@@ -69,7 +69,7 @@ public class ComponentIndexer implements BatchComponent {
pathFromSourceDir = inputFile.relativePath();
}
Resource sonarFile = File.create(inputFile.relativePath(), pathFromSourceDir, languages.get(languageKey), unitTest);
- if (Java.KEY.equals(languageKey)) {
+ if ("java".equals(languageKey)) {
sonarFile.setDeprecatedKey(JavaFile.fromRelativePath(pathFromSourceDir, false).getDeprecatedKey());
} else {
sonarFile.setDeprecatedKey(pathFromSourceDir);
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/InputFileBuilder.java b/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/InputFileBuilder.java
index 142f2d1c252..1a7f2ca6f39 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/InputFileBuilder.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/InputFileBuilder.java
@@ -24,7 +24,6 @@ import org.slf4j.LoggerFactory;
import org.sonar.api.batch.fs.FileSystem;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.internal.DefaultInputFile;
-import org.sonar.api.resources.Java;
import org.sonar.api.resources.JavaFile;
import org.sonar.api.scan.filesystem.PathResolver;
import org.sonar.batch.bootstrap.AnalysisMode;
@@ -118,7 +117,7 @@ class InputFileBuilder {
inputFile.setPathRelativeToSourceDir(sourceRelativePath);
inputFile.setSourceDirAbsolutePath(FilenameUtils.normalize(sourceDir.getAbsolutePath(), true));
- if (Java.KEY.equals(inputFile.language())) {
+ if ("java".equals(inputFile.language())) {
inputFile.setDeprecatedKey(new StringBuilder()
.append(moduleKey).append(":").append(JavaFile.fromRelativePath(sourceRelativePath, false).getDeprecatedKey()).toString());
} else {