From: Duarte Meneses Date: Wed, 26 Apr 2023 16:03:34 +0000 (-0500) Subject: Revert "SONAR-19050 update RuleDto to add characteristics" X-Git-Tag: 10.1.0.73491~378 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=23063324622502be596ce9bb613eaa3d993aca19;p=sonarqube.git Revert "SONAR-19050 update RuleDto to add characteristics" This reverts commit 145d97dd8fe78d2d19b569e55ade89c056a98fda. --- diff --git a/build.gradle b/build.gradle index 2bbf56068c0..d227c981b78 100644 --- a/build.gradle +++ b/build.gradle @@ -215,8 +215,8 @@ subprojects { dependency 'org.sonarsource.kotlin:sonar-kotlin-plugin:2.13.0.2116' dependency 'org.sonarsource.slang:sonar-ruby-plugin:1.12.0.4259' dependency 'org.sonarsource.slang:sonar-scala-plugin:1.12.0.4259' - dependency "org.sonarsource.api.plugin:sonar-plugin-api:9.16.0.500" - dependency "org.sonarsource.api.plugin:sonar-plugin-api-test-fixtures:9.16.0.500" + dependency "org.sonarsource.api.plugin:sonar-plugin-api:$pluginApiVersion" + dependency "org.sonarsource.api.plugin:sonar-plugin-api-test-fixtures:$pluginApiVersion" dependency 'org.sonarsource.xml:sonar-xml-plugin:2.7.0.3820' dependency 'org.sonarsource.iac:sonar-iac-plugin:1.15.0.3752' dependency 'org.sonarsource.text:sonar-text-plugin:2.0.2.1090' diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleDto.java index 5afe149cc34..d88245d7486 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleDto.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleDto.java @@ -33,7 +33,6 @@ import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.builder.HashCodeBuilder; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.RuleStatus; -import org.sonar.api.rules.RuleCharacteristic; import org.sonar.api.rules.RuleType; import static com.google.common.base.Preconditions.checkArgument; @@ -41,7 +40,6 @@ import static java.util.Arrays.asList; import static java.util.Collections.emptySet; import static java.util.Optional.ofNullable; import static org.sonar.db.rule.RuleDescriptionSectionDto.DEFAULT_KEY; -import static org.sonar.db.rule.RuleTypeToRuleCharacteristicConverter.convertToRuleCharacteristic; public class RuleDto { @@ -100,7 +98,6 @@ public class RuleDto { private String systemTagsField = null; private String securityStandardsField = null; private int type = 0; - private RuleCharacteristic characteristic = null; private Scope scope = null; private RuleKey key = null; @@ -244,7 +241,7 @@ public class RuleDto { return deserializeStringSet(educationPrinciplesField); } - public RuleDto setEducationPrinciples(Set educationPrinciples) { + public RuleDto setEducationPrinciples(Set educationPrinciples){ this.educationPrinciplesField = serializeStringSet(educationPrinciples); return this; } @@ -398,26 +395,6 @@ public class RuleDto { return this; } - @CheckForNull - public RuleCharacteristic getCharacteristic() { - return this.characteristic; - } - - @CheckForNull - public RuleCharacteristic getEffectiveCharacteristic() { - return characteristic != null ? characteristic : convertTypeToCharacteristic(type); - } - - private static RuleCharacteristic convertTypeToCharacteristic(int type) { - RuleType ruleType = RuleType.valueOf(type); - return convertToRuleCharacteristic(ruleType); - } - - public RuleDto setCharacteristic(RuleCharacteristic characteristic) { - this.characteristic = characteristic; - return this; - } - public long getCreatedAt() { return createdAt; } @@ -436,6 +413,7 @@ public class RuleDto { return this; } + @CheckForNull public String getDefRemediationFunction() { return defRemediationFunction; diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleTypeToRuleCharacteristicConverter.java b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleTypeToRuleCharacteristicConverter.java deleted file mode 100644 index bd7cb27168e..00000000000 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleTypeToRuleCharacteristicConverter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2023 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.db.rule; - -import org.sonar.api.rules.RuleCharacteristic; -import org.sonar.api.rules.RuleType; - -public class RuleTypeToRuleCharacteristicConverter { - - private RuleTypeToRuleCharacteristicConverter() { - } - - public static RuleCharacteristic convertToRuleCharacteristic(RuleType ruleType) { - return switch (ruleType) { - case BUG -> RuleCharacteristic.ROBUST; - case CODE_SMELL -> RuleCharacteristic.CLEAR; - case SECURITY_HOTSPOT, VULNERABILITY -> RuleCharacteristic.SECURE; - }; - } - -} diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/rule/RuleMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/rule/RuleMapper.xml index ca8352d9cd8..fcd120cd8b5 100644 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/rule/RuleMapper.xml +++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/rule/RuleMapper.xml @@ -39,8 +39,7 @@ r.ad_hoc_description as "adHocDescription", r.ad_hoc_severity as "adHocSeverity", r.ad_hoc_type as "adHocType", - r.education_principles as "educationPrinciplesField", - r.characteristic as "characteristic" + r.education_principles as "educationPrinciplesField" diff --git a/server/sonar-db-dao/src/schema/schema-sq.ddl b/server/sonar-db-dao/src/schema/schema-sq.ddl index eee610da133..08a75b195be 100644 --- a/server/sonar-db-dao/src/schema/schema-sq.ddl +++ b/server/sonar-db-dao/src/schema/schema-sq.ddl @@ -873,8 +873,7 @@ CREATE TABLE "RULES"( "AD_HOC_DESCRIPTION" CHARACTER LARGE OBJECT, "AD_HOC_SEVERITY" CHARACTER VARYING(10), "AD_HOC_TYPE" TINYINT, - "EDUCATION_PRINCIPLES" CHARACTER VARYING(255), - "CHARACTERISTIC" CHARACTER VARYING(20) + "EDUCATION_PRINCIPLES" CHARACTER VARYING(255) ); ALTER TABLE "RULES" ADD CONSTRAINT "PK_RULES" PRIMARY KEY("UUID"); CREATE UNIQUE INDEX "RULES_REPO_KEY" ON "RULES"("PLUGIN_RULE_KEY" NULLS FIRST, "PLUGIN_NAME" NULLS FIRST); diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDtoTest.java index ce4e485ece3..a6aec187b52 100644 --- a/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDtoTest.java +++ b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDtoTest.java @@ -20,18 +20,11 @@ package org.sonar.db.rule; import com.google.common.collect.ImmutableSet; -import com.tngtech.java.junit.dataprovider.DataProvider; -import com.tngtech.java.junit.dataprovider.DataProviderRunner; -import com.tngtech.java.junit.dataprovider.UseDataProvider; import java.util.Collections; import java.util.Set; import java.util.TreeSet; import org.jetbrains.annotations.NotNull; -import org.junit.Rule; import org.junit.Test; -import org.junit.runner.RunWith; -import org.sonar.api.rules.RuleCharacteristic; -import org.sonar.api.rules.RuleType; import org.sonar.core.util.Uuids; import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric; @@ -41,11 +34,10 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.sonar.db.rule.RuleDto.ERROR_MESSAGE_SECTION_ALREADY_EXISTS; import static org.sonar.db.rule.RuleTesting.newRule; -@RunWith(DataProviderRunner.class) public class RuleDtoTest { - public static final String SECTION_KEY = "section key"; + public static final String SECTION_KEY = "section key"; @Test public void fail_if_key_is_too_long() { assertThatThrownBy(() -> new RuleDto().setRuleKey(repeat("x", 250))) @@ -186,27 +178,4 @@ public class RuleDtoTest { .key(section_key) .build(); } - - @Test - public void getEffectiveCharacteristic_when_noCharacteristicInitialized_should_return_dbConstantValueFromConverter() { - RuleDto rule = new RuleDto().setType(RuleType.BUG); - - RuleCharacteristic characteristic = rule.getCharacteristic(); - assertThat(characteristic).isNull(); - - RuleCharacteristic effectiveCharacteristic = rule.getEffectiveCharacteristic(); - RuleCharacteristic expected = RuleTypeToRuleCharacteristicConverter.convertToRuleCharacteristic(RuleType.BUG); - assertThat(effectiveCharacteristic).isEqualTo(expected); - } - - @Test - public void getEffectiveCharacteristic_when_characteristicInitialized_should_return_characteristicDbConstantValue() { - RuleDto rule = new RuleDto().setType(RuleType.BUG).setCharacteristic(RuleCharacteristic.COMPLIANT); - - RuleCharacteristic effectiveCharacteristic = rule.getEffectiveCharacteristic(); - RuleCharacteristic characteristic = rule.getCharacteristic(); - - assertThat(effectiveCharacteristic).isEqualTo(characteristic).isEqualTo(RuleCharacteristic.COMPLIANT); - } - } diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleTypeToRuleCharacteristicConverterTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleTypeToRuleCharacteristicConverterTest.java deleted file mode 100644 index 8bf53ac0984..00000000000 --- a/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleTypeToRuleCharacteristicConverterTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2023 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.db.rule; - -import com.tngtech.java.junit.dataprovider.DataProvider; -import com.tngtech.java.junit.dataprovider.DataProviderRunner; -import com.tngtech.java.junit.dataprovider.UseDataProvider; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.sonar.api.rules.RuleCharacteristic; -import org.sonar.api.rules.RuleType; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.sonar.db.rule.RuleTypeToRuleCharacteristicConverter.convertToRuleCharacteristic; - -@RunWith(DataProviderRunner.class) -public class RuleTypeToRuleCharacteristicConverterTest { - - @Test - @UseDataProvider("ruleTypeToRulCharacteristicData") - public void convertToRuleCharacteristic_when_receivedNonNullRuleType_should_convertToCorrespondingDefaultCharacteristic(RuleType type, - RuleCharacteristic expectedCharacteristic) { - assertThat(convertToRuleCharacteristic(type)).isEqualTo(expectedCharacteristic); - } - - @DataProvider - public static Object[][] ruleTypeToRulCharacteristicData() { - return new Object[][] { - {RuleType.CODE_SMELL, RuleCharacteristic.CLEAR}, - {RuleType.BUG, RuleCharacteristic.ROBUST}, - {RuleType.VULNERABILITY, RuleCharacteristic.SECURE}, - {RuleType.SECURITY_HOTSPOT, RuleCharacteristic.SECURE} - }; - } - -} diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v101/AddCharacteristicInRules.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v101/AddCharacteristicInRules.java deleted file mode 100644 index 0faddfe96be..00000000000 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v101/AddCharacteristicInRules.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2023 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.server.platform.db.migration.version.v101; - -import java.sql.Connection; -import java.sql.SQLException; -import org.sonar.db.Database; -import org.sonar.db.DatabaseUtils; -import org.sonar.server.platform.db.migration.def.ColumnDef; -import org.sonar.server.platform.db.migration.def.VarcharColumnDef; -import org.sonar.server.platform.db.migration.sql.AddColumnsBuilder; -import org.sonar.server.platform.db.migration.step.DdlChange; - -public class AddCharacteristicInRules extends DdlChange { - - private static final String TABLE_NAME = "rules"; - private static final String COLUMN_NAME = "characteristic"; - - public AddCharacteristicInRules(Database db) { - super(db); - } - - @Override - public void execute(Context context) throws SQLException { - try (Connection c = getDatabase().getDataSource().getConnection()) { - if (!DatabaseUtils.tableColumnExists(c, TABLE_NAME, COLUMN_NAME)) { - - ColumnDef columnDef = VarcharColumnDef.newVarcharColumnDefBuilder() - .setColumnName(COLUMN_NAME) - .setLimit(20) - .setIsNullable(true) - .build(); - context.execute(new AddColumnsBuilder(getDialect(), TABLE_NAME).addColumn(columnDef).build()); - } - } - - } -} diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v101/DbVersion101.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v101/DbVersion101.java index f2479a6bfd1..8285e6f6d24 100644 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v101/DbVersion101.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v101/DbVersion101.java @@ -50,6 +50,6 @@ public class DbVersion101 implements DbVersion { .add(10_1_006, "Update value of 'is_main' in 'project_branches' table", UpdateIsMainColumnInProjectBranches.class) .add(10_1_007, "Alter column 'is_main' in 'project_branches' table - make it not nullable", AlterIsMainColumnInProjectBranches.class) .add(10_1_008, "Increase size of 'internal_properties.kee' from 20 to 40 characters", IncreaseKeeColumnSizeInInternalProperties.class) - .add(10_1_009, "Add column 'characteristic' to 'rules' table", AddCharacteristicInRules.class); + ; } } diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v101/AddCharacteristicInRulesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v101/AddCharacteristicInRulesTest.java deleted file mode 100644 index 7990ef4b8e5..00000000000 --- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v101/AddCharacteristicInRulesTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2023 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.server.platform.db.migration.version.v101; - -import java.sql.SQLException; -import org.junit.Rule; -import org.junit.Test; -import org.sonar.db.CoreDbTester; - -import static java.sql.Types.VARCHAR; - -public class AddCharacteristicInRulesTest { - - private static final String TABLE_NAME = "rules"; - private static final String COLUMN_NAME = "characteristic"; - - @Rule - public final CoreDbTester db = CoreDbTester.createForSchema(AddCharacteristicInRulesTest.class, "schema.sql"); - - private final AddCharacteristicInRules underTest = new AddCharacteristicInRules(db.database()); - - @Test - public void characteristic_column_exists_with_null_value() throws SQLException { - db.assertColumnDoesNotExist(TABLE_NAME, COLUMN_NAME); - underTest.execute(); - db.assertColumnDefinition(TABLE_NAME, COLUMN_NAME, VARCHAR, 20, true); - } - - @Test - public void migration_is_reentrant() throws SQLException { - db.assertColumnDoesNotExist(TABLE_NAME, COLUMN_NAME); - underTest.execute(); - underTest.execute(); - db.assertColumnDefinition(TABLE_NAME, COLUMN_NAME, VARCHAR, 20, true); - } - -} diff --git a/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v101/AddCharacteristicInRulesTest/schema.sql b/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v101/AddCharacteristicInRulesTest/schema.sql deleted file mode 100644 index 06e99d24329..00000000000 --- a/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v101/AddCharacteristicInRulesTest/schema.sql +++ /dev/null @@ -1,41 +0,0 @@ -CREATE TABLE "RULES"( - "UUID" CHARACTER VARYING(40) NOT NULL, - "NAME" CHARACTER VARYING(200), - "PLUGIN_RULE_KEY" CHARACTER VARYING(200) NOT NULL, - "PLUGIN_KEY" CHARACTER VARYING(200), - "PLUGIN_CONFIG_KEY" CHARACTER VARYING(200), - "PLUGIN_NAME" CHARACTER VARYING(255) NOT NULL, - "SCOPE" CHARACTER VARYING(20) NOT NULL, - "PRIORITY" INTEGER, - "STATUS" CHARACTER VARYING(40), - "LANGUAGE" CHARACTER VARYING(20), - "DEF_REMEDIATION_FUNCTION" CHARACTER VARYING(20), - "DEF_REMEDIATION_GAP_MULT" CHARACTER VARYING(20), - "DEF_REMEDIATION_BASE_EFFORT" CHARACTER VARYING(20), - "GAP_DESCRIPTION" CHARACTER VARYING(4000), - "SYSTEM_TAGS" CHARACTER VARYING(4000), - "IS_TEMPLATE" BOOLEAN DEFAULT FALSE NOT NULL, - "DESCRIPTION_FORMAT" CHARACTER VARYING(20), - "RULE_TYPE" TINYINT, - "SECURITY_STANDARDS" CHARACTER VARYING(4000), - "IS_AD_HOC" BOOLEAN NOT NULL, - "IS_EXTERNAL" BOOLEAN NOT NULL, - "CREATED_AT" BIGINT, - "UPDATED_AT" BIGINT, - "TEMPLATE_UUID" CHARACTER VARYING(40), - "NOTE_DATA" CHARACTER LARGE OBJECT, - "NOTE_USER_UUID" CHARACTER VARYING(255), - "NOTE_CREATED_AT" BIGINT, - "NOTE_UPDATED_AT" BIGINT, - "REMEDIATION_FUNCTION" CHARACTER VARYING(20), - "REMEDIATION_GAP_MULT" CHARACTER VARYING(20), - "REMEDIATION_BASE_EFFORT" CHARACTER VARYING(20), - "TAGS" CHARACTER VARYING(4000), - "AD_HOC_NAME" CHARACTER VARYING(200), - "AD_HOC_DESCRIPTION" CHARACTER LARGE OBJECT, - "AD_HOC_SEVERITY" CHARACTER VARYING(10), - "AD_HOC_TYPE" TINYINT, - "EDUCATION_PRINCIPLES" CHARACTER VARYING(255) -); -ALTER TABLE "RULES" ADD CONSTRAINT "PK_RULES" PRIMARY KEY("UUID"); -CREATE UNIQUE INDEX "RULES_REPO_KEY" ON "RULES"("PLUGIN_RULE_KEY" NULLS FIRST, "PLUGIN_NAME" NULLS FIRST); diff --git a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java index c00af6fddbb..324097ee15d 100644 --- a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java +++ b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java @@ -45,7 +45,6 @@ import org.sonar.api.issue.Issue; import org.sonar.api.issue.IssueComment; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.Severity; -import org.sonar.api.rules.RuleCharacteristic; import org.sonar.api.rules.RuleType; import org.sonar.api.utils.Duration; import org.sonar.core.issue.tracking.Trackable; @@ -56,7 +55,6 @@ public class DefaultIssue implements Issue, Trackable, org.sonar.api.ce.measure. private String key = null; private RuleType type = null; - private RuleCharacteristic characteristic = null; private String componentUuid = null; private String componentKey = null; @@ -158,17 +156,6 @@ public class DefaultIssue implements Issue, Trackable, org.sonar.api.ce.measure. return this; } - @CheckForNull - @Override - public RuleCharacteristic characteristic() { - return characteristic; - } - - public DefaultIssue setCharacteristic(RuleCharacteristic characteristic) { - this.characteristic = characteristic; - return this; - } - /** * Can be null on Views or Devs */ 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 d2e606bee1a..42418950a25 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 @@ -26,8 +26,8 @@ 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.code.CodeCharacteristic; import org.sonar.api.rule.RuleKey; -import org.sonar.api.rules.RuleCharacteristic; import org.sonar.api.rules.RuleType; import static java.lang.String.format; @@ -39,7 +39,6 @@ public class DefaultExternalIssue extends AbstractDefaultIssue