From: Simon Brandhof Date: Fri, 20 Jun 2014 13:04:44 +0000 (+0200) Subject: SONAR-5007 remove org.sonar.api.batch.rules.QProfile from API X-Git-Tag: 4.4-RC1~241 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a963e93c19f6ab9aab5a3c7b3535aac28fc63117;p=sonarqube.git SONAR-5007 remove org.sonar.api.batch.rules.QProfile from API --- diff --git a/sonar-batch/src/main/java/org/sonar/batch/mediumtest/AnalyzerMediumTester.java b/sonar-batch/src/main/java/org/sonar/batch/mediumtest/AnalyzerMediumTester.java index b55e13ae912..0f2a941412c 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/mediumtest/AnalyzerMediumTester.java +++ b/sonar-batch/src/main/java/org/sonar/batch/mediumtest/AnalyzerMediumTester.java @@ -30,7 +30,7 @@ import org.sonar.api.batch.analyzer.measure.AnalyzerMeasure; import org.sonar.api.batch.debt.internal.DefaultDebtModel; import org.sonar.api.batch.rule.internal.ActiveRulesBuilder; import org.sonar.api.batch.rule.internal.RulesBuilder; -import org.sonar.api.batch.rules.QProfile; +import org.sonar.batch.rule.QProfile; import org.sonar.api.measures.CoreMetrics; import org.sonar.api.measures.Metric; import org.sonar.api.measures.MetricFinder; diff --git a/sonar-batch/src/main/java/org/sonar/batch/rule/ActiveRulesProvider.java b/sonar-batch/src/main/java/org/sonar/batch/rule/ActiveRulesProvider.java index d6c6eb020c3..06abd2883a0 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/rule/ActiveRulesProvider.java +++ b/sonar-batch/src/main/java/org/sonar/batch/rule/ActiveRulesProvider.java @@ -25,7 +25,6 @@ import org.picocontainer.injectors.ProviderAdapter; import org.sonar.api.batch.rule.ActiveRules; import org.sonar.api.batch.rule.internal.ActiveRulesBuilder; import org.sonar.api.batch.rule.internal.NewActiveRule; -import org.sonar.api.batch.rules.QProfile; import org.sonar.api.rules.Rule; import org.sonar.api.rules.RuleFinder; import org.sonar.api.rules.RuleParam; diff --git a/sonar-batch/src/main/java/org/sonar/batch/rule/ModuleQProfiles.java b/sonar-batch/src/main/java/org/sonar/batch/rule/ModuleQProfiles.java index c26b7767700..e9ba2db4352 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/rule/ModuleQProfiles.java +++ b/sonar-batch/src/main/java/org/sonar/batch/rule/ModuleQProfiles.java @@ -21,7 +21,6 @@ package org.sonar.batch.rule; import org.sonar.batch.languages.Language; -import org.sonar.api.batch.rules.QProfile; import com.google.common.collect.ImmutableMap; import org.apache.commons.lang.StringUtils; import org.sonar.api.BatchComponent; diff --git a/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileEventsDecorator.java b/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileEventsDecorator.java index eeb1c7fd777..66fc512d7c1 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileEventsDecorator.java +++ b/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileEventsDecorator.java @@ -25,7 +25,6 @@ import org.sonar.api.batch.DependsUpon; import org.sonar.api.batch.Event; import org.sonar.api.batch.TimeMachine; import org.sonar.api.batch.TimeMachineQuery; -import org.sonar.api.batch.rules.QProfile; import org.sonar.api.measures.CoreMetrics; import org.sonar.api.measures.Measure; import org.sonar.api.measures.Metric; diff --git a/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileSensor.java b/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileSensor.java index 2d591a26794..8f84c66ca90 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileSensor.java +++ b/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileSensor.java @@ -22,7 +22,6 @@ package org.sonar.batch.rule; import org.sonar.api.batch.Sensor; import org.sonar.api.batch.SensorContext; import org.sonar.api.batch.fs.FileSystem; -import org.sonar.api.batch.rules.QProfile; import org.sonar.api.measures.CoreMetrics; import org.sonar.api.measures.Measure; import org.sonar.api.resources.Project; diff --git a/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileVerifier.java b/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileVerifier.java index 52004908844..7f6db7b10f2 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileVerifier.java +++ b/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileVerifier.java @@ -19,8 +19,6 @@ */ package org.sonar.batch.rule; -import org.sonar.api.batch.rules.QProfile; - import com.google.common.annotations.VisibleForTesting; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; diff --git a/sonar-batch/src/main/java/org/sonar/batch/rule/RulesProfileProvider.java b/sonar-batch/src/main/java/org/sonar/batch/rule/RulesProfileProvider.java index 20a80186919..96798424939 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/rule/RulesProfileProvider.java +++ b/sonar-batch/src/main/java/org/sonar/batch/rule/RulesProfileProvider.java @@ -19,8 +19,6 @@ */ package org.sonar.batch.rule; -import org.sonar.api.batch.rules.QProfile; - import com.google.common.collect.Lists; import org.apache.commons.lang.StringUtils; import org.picocontainer.injectors.ProviderAdapter; diff --git a/sonar-batch/src/main/java/org/sonar/batch/rule/UsedQProfiles.java b/sonar-batch/src/main/java/org/sonar/batch/rule/UsedQProfiles.java index 97b883791e9..0231ebe5e4c 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/rule/UsedQProfiles.java +++ b/sonar-batch/src/main/java/org/sonar/batch/rule/UsedQProfiles.java @@ -24,7 +24,6 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; -import org.sonar.api.batch.rules.QProfile; import org.sonar.api.utils.text.JsonWriter; import javax.annotation.concurrent.Immutable; diff --git a/sonar-batch/src/main/java/org/sonar/batch/rules/DefaultQProfileReferential.java b/sonar-batch/src/main/java/org/sonar/batch/rules/DefaultQProfileReferential.java index 136c2e999b9..7383b9ec9ec 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/rules/DefaultQProfileReferential.java +++ b/sonar-batch/src/main/java/org/sonar/batch/rules/DefaultQProfileReferential.java @@ -19,7 +19,7 @@ */ package org.sonar.batch.rules; -import org.sonar.api.batch.rules.QProfile; +import org.sonar.batch.rule.QProfile; import org.sonar.core.qualityprofile.db.QualityProfileDao; import org.sonar.core.qualityprofile.db.QualityProfileDto; diff --git a/sonar-batch/src/main/java/org/sonar/batch/rules/QProfilesReferential.java b/sonar-batch/src/main/java/org/sonar/batch/rules/QProfilesReferential.java index 5fc80852778..5d50cf33242 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/rules/QProfilesReferential.java +++ b/sonar-batch/src/main/java/org/sonar/batch/rules/QProfilesReferential.java @@ -19,7 +19,7 @@ */ package org.sonar.batch.rules; -import org.sonar.api.batch.rules.QProfile; +import org.sonar.batch.rule.QProfile; import org.sonar.api.BatchComponent; diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/ActiveRulesProviderTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/ActiveRulesProviderTest.java index 52d5d495762..cae44f3e7c1 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/rule/ActiveRulesProviderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/rule/ActiveRulesProviderTest.java @@ -23,7 +23,6 @@ import org.junit.Before; import org.junit.Test; import org.sonar.api.batch.rule.ActiveRule; import org.sonar.api.batch.rule.ActiveRules; -import org.sonar.api.batch.rules.QProfile; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.Severity; import org.sonar.api.rules.Rule; diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/ModuleQProfilesTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/ModuleQProfilesTest.java index 8d30e5b4a66..ab941f09db7 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/rule/ModuleQProfilesTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/rule/ModuleQProfilesTest.java @@ -21,7 +21,6 @@ package org.sonar.batch.rule; import com.google.common.collect.Lists; import org.junit.Test; -import org.sonar.api.batch.rules.QProfile; import org.sonar.api.config.Settings; import org.sonar.api.resources.Language; import org.sonar.api.resources.Languages; diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileSensorTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileSensorTest.java index 830b980a6c5..844a26ee9cc 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileSensorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileSensorTest.java @@ -22,7 +22,6 @@ package org.sonar.batch.rule; import org.junit.Test; import org.sonar.api.batch.SensorContext; import org.sonar.api.batch.fs.internal.DefaultFileSystem; -import org.sonar.api.batch.rules.QProfile; import org.sonar.api.measures.CoreMetrics; import org.sonar.api.resources.Project; import org.sonar.api.test.IsMeasure; diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileVerifierTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileVerifierTest.java index d8de8ea3055..3b9cc15c4b7 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileVerifierTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileVerifierTest.java @@ -25,7 +25,6 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.slf4j.Logger; import org.sonar.api.batch.fs.internal.DefaultFileSystem; -import org.sonar.api.batch.rules.QProfile; import org.sonar.api.config.Settings; import org.sonar.api.utils.MessageException; diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProfileProviderTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProfileProviderTest.java index 8c14a751d4e..f45636cca05 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProfileProviderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProfileProviderTest.java @@ -19,8 +19,6 @@ */ package org.sonar.batch.rule; -import org.sonar.api.batch.rules.QProfile; - import org.junit.Test; import org.sonar.api.batch.rule.ActiveRules; import org.sonar.api.config.Settings; diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/UsedQProfilesTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/UsedQProfilesTest.java index 671dbd2f6da..05ea1617306 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/rule/UsedQProfilesTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/rule/UsedQProfilesTest.java @@ -20,7 +20,6 @@ package org.sonar.batch.rule; import org.junit.Test; -import org.sonar.api.batch.rules.QProfile; import java.util.Arrays; import java.util.Map; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/rules/QProfile.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rules/QProfile.java deleted file mode 100644 index 7a8d62152d7..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/rules/QProfile.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube 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. - * - * SonarQube 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.api.batch.rules; - -import com.google.common.base.Objects; - -public class QProfile { - - private final String key, name, language; - - public QProfile(String key, String name, String language) { - this.key = key; - this.name = name; - this.language = language; - } - - public String name() { - return name; - } - - public String language() { - return language; - } - - public String key() { - return key; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - QProfile qProfile = (QProfile) o; - return key.equals(qProfile.key); - } - - @Override - public int hashCode() { - return key.hashCode(); - } - - @Override - public String toString() { - return Objects.toStringHelper(this) - .add("key", key) - .add("name", name) - .add("language", language) - .toString(); - } -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/rules/package-info.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rules/package-info.java deleted file mode 100644 index ba4f7e46f29..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/rules/package-info.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube 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. - * - * SonarQube 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. - */ -@javax.annotation.ParametersAreNonnullByDefault -package org.sonar.api.batch.rules; \ No newline at end of file