aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2015-01-07 22:01:59 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2015-01-07 22:07:30 +0100
commitd3dd88adf13034f9972a5a673280709cca95f935 (patch)
treeff1caadf8801ad142431b6bd36e77ab19e68bdce /sonar-plugin-api/src
parentc698fdc1b308fef1a7af5767e42e6b7e82fb502e (diff)
downloadsonarqube-d3dd88adf13034f9972a5a673280709cca95f935.tar.gz
sonarqube-d3dd88adf13034f9972a5a673280709cca95f935.zip
SONAR-6014 Drop deprecated violations
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorContext.java22
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java27
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/rules/ViolationFilter.java41
4 files changed, 1 insertions, 91 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorContext.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorContext.java
index be4b1e0cd70..0e2bd8b61b0 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorContext.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorContext.java
@@ -26,7 +26,6 @@ import org.sonar.api.measures.Metric;
import org.sonar.api.resources.Project;
import org.sonar.api.resources.Resource;
import org.sonar.api.rules.Violation;
-import org.sonar.api.violations.ViolationQuery;
import java.util.Collection;
import java.util.Date;
@@ -102,27 +101,6 @@ public interface DecoratorContext {
// RULES
/**
- * Returns the violations that match the {@link ViolationQuery} parameters.
- *
- * @since 2.8
- * @param violationQuery
- * the request parameters specified as a {@link ViolationQuery}
- * @return the list of violations that match those parameters
- * @deprecated in 3.6, replaced by {@link org.sonar.api.issue.Issuable}
- */
- @Deprecated
- List<Violation> getViolations(ViolationQuery violationQuery);
-
- /**
- * Returns all the active (= non switched-off) violations found on the current resource.
- *
- * @return the list of violations
- * @deprecated in 3.6, replaced by {@link org.sonar.api.issue.Issuable}
- */
- @Deprecated
- List<Violation> getViolations();
-
- /**
* Save a coding rule violation. The decorator which calls this method must be depended upon BatchBarriers.END_OF_VIOLATIONS_GENERATION.
*
* @since 2.5
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java
index db50719f48f..f21b83bab5f 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java
@@ -27,7 +27,6 @@ import org.sonar.api.resources.Project;
import org.sonar.api.resources.ProjectLink;
import org.sonar.api.resources.Resource;
import org.sonar.api.rules.Violation;
-import org.sonar.api.violations.ViolationQuery;
import org.sonar.graph.DirectedGraphAccessor;
import javax.annotation.CheckForNull;
@@ -124,32 +123,6 @@ public abstract class SonarIndex implements DirectedGraphAccessor<Resource, Depe
public abstract <M> M getMeasures(Resource resource, MeasuresFilter<M> filter);
/**
- * Returns the violations that match the {@link ViolationQuery} parameters.
- *
- * @since 2.8
- * @param violationQuery
- * the request parameters specified as a {@link ViolationQuery}
- * @return the list of violations that match those parameters
- * @deprecated in 3.6
- */
- @Deprecated
- public abstract List<Violation> getViolations(ViolationQuery violationQuery);
-
- /**
- * Returns all the active (= non switched-off) violations found on the given resource. Equivalent to
- * {@link #getViolations(ViolationQuery)} called with <code>ViolationQuery.create().forResource(resource).ignoreSwitchedOff(true)</code>
- * as a parameter.
- *
- * @since 2.7
- * @return the list of violations
- * @deprecated in 3.6
- */
- @Deprecated
- public final List<Violation> getViolations(Resource resource) {
- return getViolations(ViolationQuery.create().forResource(resource));
- }
-
- /**
* @since 2.5
* @deprecated in 3.6
*/
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java
index 9f35998b40e..3d963373c22 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java
@@ -49,7 +49,7 @@ public class Violation {
/**
* Creates of a violation from a rule. Will need to define the resource later on
*
- * @deprecated since 2.3. Use the factory method create()
+ * @deprecated since 2.3. Use the factory method {@link #create(ActiveRule, Resource)}
*/
@Deprecated
public Violation(Rule rule) {
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ViolationFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ViolationFilter.java
deleted file mode 100644
index 5e40e540934..00000000000
--- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ViolationFilter.java
+++ /dev/null
@@ -1,41 +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.rules;
-
-import org.sonar.api.BatchExtension;
-import org.sonar.api.batch.DecoratorBarriers;
-import org.sonar.api.batch.DependedUpon;
-
-/**
- * Filter violations to save. For example, ignore a violation if it occurs on a line of code commented with //NOSONAR
- *
- * @since 1.12
- * @deprecated in 3.6. Replaced by {@link org.sonar.api.issue.IssueFilter}.
- */
-@DependedUpon(value = DecoratorBarriers.START_VIOLATIONS_GENERATION)
-@Deprecated
-public interface ViolationFilter extends BatchExtension {
-
- /**
- * Return true if the violation must be ignored, else it's saved into database.
- */
- boolean isIgnored(Violation violation);
-
-}