aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorssjenka <ssjenka@ops-slave-centos7-1.internal.sonarsource.com>2016-07-28 11:36:07 +0200
committerssjenka <ssjenka@ops-slave-centos7-1.internal.sonarsource.com>2016-07-28 11:36:07 +0200
commitc61be4f486e6c9fabc5cc5fd03dba40b79e056f1 (patch)
tree744a77b73a772066feedec06c54109f22fc35028 /plugins
parent768a9f68bf1ae0b27c30fa3269381e7df16a99f2 (diff)
parent86ea84aacc37279b3d992b28a80a7aeab405e5e7 (diff)
downloadsonarqube-c61be4f486e6c9fabc5cc5fd03dba40b79e056f1.tar.gz
sonarqube-c61be4f486e6c9fabc5cc5fd03dba40b79e056f1.zip
Automatic merge from branch-6.0
* origin/branch-6.0: Revert deprecation of SonarQubeVersion
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java2
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OneIssuePerLineSensor.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java
index 06925832258..9a84189608f 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java
@@ -144,7 +144,7 @@ public class XooPlugin implements Plugin {
DeprecatedResourceApiSensor.class);
}
- if (context.getRuntime().getApiVersion().isGreaterThanOrEqual(Version.create(5, 5))) {
+ if (context.getSonarQubeVersion().isGreaterThanOrEqual(Version.create(5, 5))) {
context.addExtension(CpdTokenizerSensor.class);
}
}
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OneIssuePerLineSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OneIssuePerLineSensor.java
index 2b9474ec391..995b10d19d8 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OneIssuePerLineSensor.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OneIssuePerLineSensor.java
@@ -19,7 +19,6 @@
*/
package org.sonar.xoo.rule;
-import org.sonar.api.SonarQubeVersion;
import org.sonar.api.batch.fs.FilePredicates;
import org.sonar.api.batch.fs.FileSystem;
import org.sonar.api.batch.fs.InputFile;
@@ -30,6 +29,7 @@ import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.SensorDescriptor;
import org.sonar.api.batch.sensor.issue.NewIssue;
import org.sonar.api.rule.RuleKey;
+import org.sonar.api.utils.Version;
import org.sonar.xoo.Xoo;
import org.sonar.xoo.Xoo2;
@@ -73,7 +73,7 @@ public class OneIssuePerLineSensor implements Sensor {
.at(file.selectLine(line))
.message("This issue is generated on each line"))
.overrideSeverity(severity != null ? Severity.valueOf(severity) : null);
- if (context.getSonarQubeVersion().isGreaterThanOrEqual(SonarQubeVersion.V5_5)) {
+ if (context.getSonarQubeVersion().isGreaterThanOrEqual(Version.create(5, 5))) {
newIssue.gap(context.settings().getDouble(EFFORT_TO_FIX_PROPERTY));
} else {
newIssue.effortToFix(context.settings().getDouble(EFFORT_TO_FIX_PROPERTY));