aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2016-07-13 17:12:46 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2016-07-13 17:18:06 +0200
commit31f83fbcab419d16c5911583784d6cf780f8c6cf (patch)
tree64cb6f75b78a36af59a6ea2b6628de9e9cd6c490 /sonar-plugin-api
parente65aa1588a6a59bb760dc7f4f31b19ce46eebcfd (diff)
downloadsonarqube-31f83fbcab419d16c5911583784d6cf780f8c6cf.tar.gz
sonarqube-31f83fbcab419d16c5911583784d6cf780f8c6cf.zip
Fix some quality flaws
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/SonarRuntime.java4
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java1
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java2
3 files changed, 3 insertions, 4 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/SonarRuntime.java b/sonar-plugin-api/src/main/java/org/sonar/api/SonarRuntime.java
index 0760fb77244..86b37e9e54c 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/SonarRuntime.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/SonarRuntime.java
@@ -22,7 +22,7 @@ package org.sonar.api;
import com.google.common.base.Preconditions;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
-import org.sonar.api.batch.BatchSide;
+import org.sonar.api.batch.ScannerSide;
import org.sonar.api.batch.sensor.Sensor;
import org.sonar.api.ce.ComputeEngineSide;
import org.sonar.api.server.ServerSide;
@@ -121,7 +121,7 @@ import static java.util.Objects.requireNonNull;
*
* @since 6.0
*/
-@BatchSide
+@ScannerSide
@ServerSide
@ComputeEngineSide
@SonarLintSide
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 031fa6de245..a3d4de28654 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
@@ -120,6 +120,7 @@ public class DefaultInputFile extends DefaultInputComponent implements InputFile
return moduleKey;
}
+ @Override
public Charset charset() {
return charset;
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java
index 34df663e54a..6ccc541dad3 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java
@@ -79,8 +79,6 @@ public class DefaultHighlighting extends DefaultStorable implements NewHighlight
checkInputFileNotNull();
TextRange newRange;
try {
- // TODO remove when SONAR-7664 is implemented
- Preconditions.checkArgument(startOffset < endOffset, "start offset should be strictly before end offset");
newRange = inputFile.newRange(startOffset, endOffset);
} catch (Exception e) {
throw new IllegalArgumentException("Unable to highlight file " + inputFile, e);