diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2021-06-09 16:26:56 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-06-17 20:03:08 +0000 |
commit | 2754feca4e5fa8fdd804c827783250f48676296c (patch) | |
tree | 1ed9522bbc9eff9444fae6bf0a951d976da2b859 /sonar-plugin-api-impl/src/main/java | |
parent | 97f2c01fdd4ae863134d4aa1bf32b7dcd512b10c (diff) | |
download | sonarqube-2754feca4e5fa8fdd804c827783250f48676296c.tar.gz sonarqube-2754feca4e5fa8fdd804c827783250f48676296c.zip |
SONAR-14925 Remove code deprecated before 7.0 in the Plugin API
Diffstat (limited to 'sonar-plugin-api-impl/src/main/java')
5 files changed, 0 insertions, 77 deletions
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/coverage/internal/DefaultCoverage.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/coverage/internal/DefaultCoverage.java index 34758d387e5..b513c8f55bf 100644 --- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/coverage/internal/DefaultCoverage.java +++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/coverage/internal/DefaultCoverage.java @@ -25,7 +25,6 @@ import java.util.TreeMap; import javax.annotation.Nullable; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.fs.internal.DefaultInputFile; -import org.sonar.api.batch.sensor.coverage.CoverageType; import org.sonar.api.batch.sensor.coverage.NewCoverage; import org.sonar.api.batch.sensor.internal.DefaultStorable; import org.sonar.api.batch.sensor.internal.SensorStorage; @@ -36,7 +35,6 @@ import static org.sonar.api.utils.Preconditions.checkState; public class DefaultCoverage extends DefaultStorable implements NewCoverage { private InputFile inputFile; - private CoverageType type; private int totalCoveredLines = 0; private int totalConditions = 0; private int totalCoveredConditions = 0; @@ -63,16 +61,6 @@ public class DefaultCoverage extends DefaultStorable implements NewCoverage { } @Override - public NewCoverage ofType(CoverageType type) { - this.type = requireNonNull(type, "type can't be null"); - return this; - } - - public CoverageType type() { - return type; - } - - @Override public NewCoverage lineHits(int line, int hits) { validateFile(); if (isExcluded()) { diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java index 34a74bb2d40..84ca63f5586 100644 --- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java +++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java @@ -76,18 +76,6 @@ public class DefaultHighlighting extends DefaultStorable implements NewHighlight } @Override - public DefaultHighlighting highlight(int startOffset, int endOffset, TypeOfText typeOfText) { - checkInputFileNotNull(); - TextRange newRange; - try { - newRange = inputFile.newRange(startOffset, endOffset); - } catch (Exception e) { - throw new IllegalArgumentException("Unable to highlight file " + inputFile, e); - } - return highlight(newRange, typeOfText); - } - - @Override public DefaultHighlighting highlight(int startLine, int startLineOffset, int endLine, int endLineOffset, TypeOfText typeOfText) { checkInputFileNotNull(); TextRange newRange; diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/DefaultSensorDescriptor.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/DefaultSensorDescriptor.java index 29de3ad4ece..ee5ced6886b 100644 --- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/DefaultSensorDescriptor.java +++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/DefaultSensorDescriptor.java @@ -96,17 +96,6 @@ public class DefaultSensorDescriptor implements SensorDescriptor { } @Override - public DefaultSensorDescriptor requireProperty(String... propertyKey) { - return requireProperties(propertyKey); - } - - @Override - public DefaultSensorDescriptor requireProperties(String... propertyKeys) { - this.configurationPredicate = config -> Arrays.stream(propertyKeys).allMatch(config::hasKey); - return this; - } - - @Override public SensorDescriptor global() { this.global = true; return this; diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/symbol/internal/DefaultSymbolTable.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/symbol/internal/DefaultSymbolTable.java index a79813f243f..87a820b06d3 100644 --- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/symbol/internal/DefaultSymbolTable.java +++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/symbol/internal/DefaultSymbolTable.java @@ -74,18 +74,6 @@ public class DefaultSymbolTable extends DefaultStorable implements NewSymbolTabl } @Override - public NewSymbol newSymbol(int startOffset, int endOffset) { - checkInputFileNotNull(); - TextRange declarationRange; - try { - declarationRange = inputFile.newRange(startOffset, endOffset); - } catch (Exception e) { - throw new IllegalArgumentException("Unable to create symbol on file " + inputFile, e); - } - return newSymbol(declarationRange); - } - - @Override public NewSymbol newSymbol(TextRange range) { checkInputFileNotNull(); TreeSet<TextRange> references = new TreeSet<>((o1, o2) -> o1.start().compareTo(o2.start())); @@ -106,17 +94,6 @@ public class DefaultSymbolTable extends DefaultStorable implements NewSymbolTabl } @Override - public NewSymbol newReference(int startOffset, int endOffset) { - TextRange referenceRange; - try { - referenceRange = inputFile.newRange(startOffset, endOffset); - } catch (Exception e) { - throw new IllegalArgumentException("Unable to create symbol reference on file " + inputFile, e); - } - return newReference(referenceRange); - } - - @Override public NewSymbol newReference(int startLine, int startLineOffset, int endLine, int endLineOffset) { TextRange referenceRange; try { diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/RulesDefinitionContext.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/RulesDefinitionContext.java index ecb2caacca8..90140b89905 100644 --- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/RulesDefinitionContext.java +++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/RulesDefinitionContext.java @@ -30,7 +30,6 @@ import org.sonar.api.server.rule.RulesDefinition; import org.sonar.api.server.rule.internal.DefaultNewRepository; import org.sonar.api.server.rule.internal.DefaultRepository; -import static java.util.Collections.emptyList; import static java.util.Collections.unmodifiableList; import static org.sonar.api.utils.Preconditions.checkState; @@ -49,12 +48,6 @@ public class RulesDefinitionContext extends RulesDefinition.Context { } @Override - @Deprecated - public RulesDefinition.NewRepository extendRepository(String key, String language) { - return createRepository(key, language); - } - - @Override @CheckForNull public RulesDefinition.Repository repository(String key) { return repositoriesByKey.get(key); @@ -65,18 +58,6 @@ public class RulesDefinitionContext extends RulesDefinition.Context { return unmodifiableList(new ArrayList<>(repositoriesByKey.values())); } - @Override - @Deprecated - public List<RulesDefinition.ExtendedRepository> extendedRepositories(String repositoryKey) { - return emptyList(); - } - - @Override - @Deprecated - public List<RulesDefinition.ExtendedRepository> extendedRepositories() { - return emptyList(); - } - public void registerRepository(DefaultNewRepository newRepository) { RulesDefinition.Repository existing = repositoriesByKey.get(newRepository.key()); if (existing != null) { |