aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java3
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/PathPattern.java4
2 files changed, 4 insertions, 3 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java
index b9cbedf6789..a24060a5df1 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java
@@ -159,7 +159,8 @@ public class DefaultInputFile implements InputFile {
return true;
}
- if (!(this.getClass() == o.getClass())) {
+ // Use instanceof to support DeprecatedDefaultInputFile
+ if (!(o instanceof DefaultInputFile)) {
return false;
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/PathPattern.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/PathPattern.java
index c1b53b68a40..93d865d1711 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/PathPattern.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/PathPattern.java
@@ -66,7 +66,7 @@ public abstract class PathPattern {
public boolean match(InputFile inputFile, boolean caseSensitiveFileExtension) {
String path = inputFile.absolutePath();
if (!caseSensitiveFileExtension) {
- String extension = sanitizeExtension(FilenameUtils.getExtension(inputFile.file().getName()));
+ String extension = super.sanitizeExtension(FilenameUtils.getExtension(inputFile.file().getName()));
if (StringUtils.isNotBlank(extension)) {
path = StringUtils.removeEndIgnoreCase(path, extension);
path = path + extension;
@@ -98,7 +98,7 @@ public abstract class PathPattern {
public boolean match(InputFile inputFile, boolean caseSensitiveFileExtension) {
String path = inputFile.relativePath();
if (!caseSensitiveFileExtension) {
- String extension = sanitizeExtension(FilenameUtils.getExtension(inputFile.file().getName()));
+ String extension = super.sanitizeExtension(FilenameUtils.getExtension(inputFile.file().getName()));
if (StringUtils.isNotBlank(extension)) {
path = StringUtils.removeEndIgnoreCase(path, extension);
path = path + extension;