From fa571d6a93e64229b4c5a4e068505eeaaa97079d Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Tue, 22 Jul 2014 17:56:26 +0200 Subject: Add medium test for InputDir --- sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java | 1 + sonar-plugin-api/src/main/java/org/sonar/api/resources/File.java | 3 +++ 2 files changed, 4 insertions(+) (limited to 'sonar-plugin-api') diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java index 2c8332ee0c5..adf80cf8cf8 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java @@ -40,6 +40,7 @@ import java.util.Set; * @since 1.10 * @deprecated since 4.5 */ +@Deprecated public interface SensorContext { /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/File.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/File.java index 7265b44fc79..707116c728d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/File.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/File.java @@ -22,6 +22,7 @@ package org.sonar.api.resources; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.builder.ToStringBuilder; import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.scan.filesystem.PathResolver; import org.sonar.api.utils.WildcardPattern; @@ -162,7 +163,9 @@ public class File extends Resource { * @param file absolute path to a file * @param module * @return null if the file is not under module basedir. + * @deprecated since 4.5 use {@link FileSystem#inputFile(org.sonar.api.batch.fs.FilePredicate)} */ + @Deprecated @CheckForNull public static File fromIOFile(java.io.File file, Project module) { String relativePathFromBasedir = new PathResolver().relativePath(module.getFileSystem().getBasedir(), file); -- cgit v1.2.3