aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2015-02-23 12:02:14 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2015-02-23 12:02:14 +0100
commitcc12644634a2b5d5d2d63764f4e0f97fc3ed333d (patch)
tree0d17f4cade8972fd87381bf273a61c2c463b05c6 /sonar-plugin-api
parentc43ee4857c97e583433997678ddaebeb7ec68722 (diff)
downloadsonarqube-cc12644634a2b5d5d2d63764f4e0f97fc3ed333d.tar.gz
sonarqube-cc12644634a2b5d5d2d63764f4e0f97fc3ed333d.zip
Revert "Fix quality flaws"
This reverts commit 7efdaa4a6e4f2ce8cbcc024e74407ccb13a413d3.
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/notifications/Notification.java4
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRuleParam.java6
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/server/debt/internal/DefaultDebtRemediationFunction.java6
3 files changed, 8 insertions, 8 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/notifications/Notification.java b/sonar-plugin-api/src/main/java/org/sonar/api/notifications/Notification.java
index 42eca231134..0666e7260f1 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/notifications/Notification.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/notifications/Notification.java
@@ -121,8 +121,8 @@ public class Notification implements Serializable {
}
@Override
- public boolean equals(@Nullable Object obj) {
- if (obj == null || this.getClass() != obj.getClass()) {
+ public boolean equals(Object obj) {
+ if (!(obj instanceof Notification)) {
return false;
}
if (this == obj) {
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRuleParam.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRuleParam.java
index 7f83179429f..683f52cde43 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRuleParam.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRuleParam.java
@@ -104,12 +104,12 @@ public class ActiveRuleParam implements Cloneable {
@Override
public boolean equals(Object obj) {
+ if (!(obj instanceof ActiveRuleParam)) {
+ return false;
+ }
if (this == obj) {
return true;
}
- if (this.getClass() != obj.getClass()) {
- return false;
- }
ActiveRuleParam other = (ActiveRuleParam) obj;
return other.getKey().equals(getKey());
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/debt/internal/DefaultDebtRemediationFunction.java b/sonar-plugin-api/src/main/java/org/sonar/api/server/debt/internal/DefaultDebtRemediationFunction.java
index 1445f50883d..d9ac5cb7813 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/server/debt/internal/DefaultDebtRemediationFunction.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/server/debt/internal/DefaultDebtRemediationFunction.java
@@ -101,12 +101,12 @@ public class DefaultDebtRemediationFunction implements DebtRemediationFunction {
@Override
public boolean equals(Object o) {
+ if (!(o instanceof DefaultDebtRemediationFunction)) {
+ return false;
+ }
if (this == o) {
return true;
}
- if (this.getClass() != o.getClass()) {
- return false;
- }
DefaultDebtRemediationFunction other = (DefaultDebtRemediationFunction) o;
return new EqualsBuilder()
.append(coefficient, other.coefficient())