aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api-impl/src/main
diff options
context:
space:
mode:
authorTobias Stadler <ts.stadler@gmx.de>2020-07-25 22:02:39 +0200
committersonartech <sonartech@sonarsource.com>2021-06-18 20:03:41 +0000
commit7b3853ad9c32b823ea3a70023e462b6b813e1a22 (patch)
treef872543b045ac5bec36d391651927e50e889de35 /sonar-plugin-api-impl/src/main
parente451875e4ba85ae989a5f1a84ca4f9e5de465431 (diff)
downloadsonarqube-7b3853ad9c32b823ea3a70023e462b6b813e1a22.tar.gz
sonarqube-7b3853ad9c32b823ea3a70023e462b6b813e1a22.zip
SONAR-15056 It should be possible to create external issues with project location
Diffstat (limited to 'sonar-plugin-api-impl/src/main')
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java
index eca02788543..93c298d76ea 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java
@@ -20,11 +20,11 @@
package org.sonar.api.batch.sensor.issue.internal;
import javax.annotation.Nullable;
+import org.sonar.api.batch.fs.internal.DefaultInputProject;
import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.issue.ExternalIssue;
import org.sonar.api.batch.sensor.issue.NewExternalIssue;
-import org.sonar.api.batch.fs.internal.DefaultInputProject;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rules.RuleType;
@@ -86,7 +86,6 @@ public class DefaultExternalIssue extends AbstractDefaultIssue<DefaultExternalIs
requireNonNull(this.engineId, "Engine id is mandatory on external issue");
requireNonNull(this.ruleId, "Rule id is mandatory on external issue");
checkState(primaryLocation != null, "Primary location is mandatory on every external issue");
- checkState(primaryLocation.inputComponent().isFile(), "External issues must be located in files");
checkState(primaryLocation.message() != null, "External issues must have a message");
checkState(severity != null, "Severity is mandatory on every external issue");
checkState(type != null, "Type is mandatory on every external issue");