diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-02-23 09:10:11 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-02-23 09:10:11 +0100 |
commit | dd5c6a9d606bcf9a6c3b7df612f5632cb9f4fc87 (patch) | |
tree | 014989cc691b05539dd971a516bdc0804cedb4c0 /sonar-plugin-api | |
parent | 2e3b73ad771219dbe958397853e9d2842114fc56 (diff) | |
download | sonarqube-dd5c6a9d606bcf9a6c3b7df612f5632cb9f4fc87.tar.gz sonarqube-dd5c6a9d606bcf9a6c3b7df612f5632cb9f4fc87.zip |
Fix some quality flaws
Diffstat (limited to 'sonar-plugin-api')
3 files changed, 4 insertions, 3 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputDir.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputDir.java index 88db382750f..ac48ea2b3b0 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputDir.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputDir.java @@ -83,7 +83,7 @@ public class DefaultInputDir implements InputDir { if (this == o) { return true; } - if (!(o instanceof DefaultInputDir)) { + if (!(this.getClass() == o.getClass())) { return false; } 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 69731c41492..b9cbedf6789 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 @@ -158,7 +158,8 @@ public class DefaultInputFile implements InputFile { if (this == o) { return true; } - if (!(o instanceof DefaultInputFile)) { + + if (!(this.getClass() == o.getClass())) { return false; } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/Category.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/Category.java index 114abe3fd27..690b2c99181 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/Category.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/Category.java @@ -59,7 +59,7 @@ public class Category { @Override public boolean equals(Object obj) { - if (!(obj instanceof Category)) { + if (!(this.getClass() == obj.getClass())) { return false; } return StringUtils.equalsIgnoreCase(((Category) obj).originalKey, this.originalKey); |