diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-02-20 16:34:31 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-02-20 17:15:00 +0100 |
commit | a4e409caa5f745b9895fe38a05f34ecf931af7d3 (patch) | |
tree | 231520bc82b8186229f7be88bc5d581d5e1c5a0c /sonar-plugin-api | |
parent | eec202cc3588afd1778501f0bcc3a576953ec5b3 (diff) | |
download | sonarqube-a4e409caa5f745b9895fe38a05f34ecf931af7d3.tar.gz sonarqube-a4e409caa5f745b9895fe38a05f34ecf931af7d3.zip |
Fix some quality flaws
Diffstat (limited to 'sonar-plugin-api')
5 files changed, 12 insertions, 11 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java index 296468c6ea6..1df01833ae5 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java @@ -443,11 +443,6 @@ public interface CoreProperties { String ANALYSIS_MODE_INCREMENTAL = "incremental"; /** - * @since 5.1 - */ - String ANALYSIS_MODE_MEDIUM_TEST = "mediumtest"; - - /** * @since 4.0 */ String PREVIEW_INCLUDE_PLUGINS = "sonar.preview.includePlugins"; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java index 77da586cc5a..a9eb2562878 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java @@ -107,11 +107,13 @@ public interface SensorContext extends org.sonar.api.batch.sensor.SensorContext /** * @deprecated since 5.1 Sensors should not read but only save data */ + @Deprecated <G extends Serializable> Measure<G> getMeasure(Metric<G> metric); /** * @deprecated since 5.1 Sensors should not read but only save data */ + @Deprecated <M> M getMeasures(MeasuresFilter<M> filter); /** @@ -129,6 +131,7 @@ public interface SensorContext extends org.sonar.api.batch.sensor.SensorContext /** * @deprecated since 5.1 Sensors should not read but only save data */ + @Deprecated <G extends Serializable> Measure<G> getMeasure(Resource resource, Metric<G> metric); /** @@ -143,6 +146,7 @@ public interface SensorContext extends org.sonar.api.batch.sensor.SensorContext /** * @deprecated since 5.1 Sensors should not read but only save data */ + @Deprecated <M> M getMeasures(Resource resource, MeasuresFilter<M> filter); /** @@ -196,16 +200,19 @@ public interface SensorContext extends org.sonar.api.batch.sensor.SensorContext /** * @deprecated since 5.1 Sensors should not read but only save data */ + @Deprecated Set<Dependency> getDependencies(); /** * @deprecated since 5.1 Sensors should not read but only save data */ + @Deprecated Collection<Dependency> getIncomingDependencies(Resource to); /** * @deprecated since 5.1 Sensors should not read but only save data */ + @Deprecated Collection<Dependency> getOutgoingDependencies(Resource from); // ----------- FILE SOURCES -------------- diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultFileSystem.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultFileSystem.java index ef1b62e9d14..719dd2f8aac 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultFileSystem.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultFileSystem.java @@ -178,8 +178,9 @@ public class DefaultFileSystem implements FileSystem { } inputFile.setModuleBaseDir(this.baseDir); cache.add(inputFile); - if (inputFile.language() != null) { - languages.add(inputFile.language()); + String language = inputFile.language(); + if (language != null) { + languages.add(language); } return this; } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputDir.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputDir.java index 834c6e9c810..88db382750f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputDir.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputDir.java @@ -23,13 +23,12 @@ import org.sonar.api.batch.fs.InputDir; import org.sonar.api.utils.PathUtils; import java.io.File; -import java.io.Serializable; import java.nio.file.Path; /** * @since 4.5 */ -public class DefaultInputDir implements InputDir, Serializable { +public class DefaultInputDir implements InputDir { private final String relativePath; private final String moduleKey; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java index c639559c60e..69731c41492 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java @@ -26,14 +26,13 @@ import javax.annotation.CheckForNull; import javax.annotation.Nullable; import java.io.File; -import java.io.Serializable; import java.nio.charset.Charset; import java.nio.file.Path; /** * @since 4.2 */ -public class DefaultInputFile implements InputFile, Serializable { +public class DefaultInputFile implements InputFile { private final String relativePath; private final String moduleKey; |