diff options
Diffstat (limited to 'plugins')
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CloseReviewsDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CloseReviewsDecorator.java index 87528e5c554..b46108b8840 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CloseReviewsDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CloseReviewsDecorator.java @@ -66,7 +66,7 @@ public class CloseReviewsDecorator implements Decorator { } String generateSqlRequest(int resourceId, int snapshotId) { - return "UPDATE reviews SET status='CLOSED' " + "WHERE resource_id = " + resourceId + " AND rule_failure_permanent_id NOT IN " + return "UPDATE reviews SET status='CLOSED' WHERE resource_id = " + resourceId + " AND rule_failure_permanent_id NOT IN " + "(SELECT permanent_id FROM rule_failures WHERE snapshot_id = " + snapshotId + " AND permanent_id IS NOT NULL)"; } diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java index 920436892a9..9a5eac592ad 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java @@ -125,7 +125,7 @@ public class VariationDecorator implements Decorator { } static final class MeasureKey { - Integer metricId; + int metricId; Integer characteristicId; MeasureKey(Object[] pastFields) { @@ -133,7 +133,7 @@ public class VariationDecorator implements Decorator { characteristicId = PastMeasuresLoader.getCharacteristicId(pastFields); } - MeasureKey(Integer metricId, Integer characteristicId) { + MeasureKey(int metricId, Integer characteristicId) { this.metricId = metricId; this.characteristicId = characteristicId; } @@ -147,10 +147,10 @@ public class VariationDecorator implements Decorator { return false; } MeasureKey that = (MeasureKey) o; - if (characteristicId != null ? !characteristicId.equals(that.characteristicId) : that.characteristicId != null) { + if (metricId != that.metricId) { return false; } - if (!metricId.equals(that.metricId)) { + if (characteristicId != null ? !characteristicId.equals(that.characteristicId) : that.characteristicId != null) { return false; } return true; @@ -158,7 +158,7 @@ public class VariationDecorator implements Decorator { @Override public int hashCode() { - int result = metricId.hashCode(); + int result = metricId; result = 31 * result + (characteristicId != null ? characteristicId.hashCode() : 0); return result; } |