aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-05-09 15:08:37 +0200
committersimonbrandhof <simon.brandhof@gmail.com>2011-05-09 15:08:37 +0200
commitfc635a302c1d7b12f9d504d1315d82b247eef716 (patch)
treee38805846f92216910bc3a4c4d4644182cd5c644 /plugins
parent4a2ccbccdc1ddb45722abcfee6f4c0383d4d2c37 (diff)
downloadsonarqube-fc635a302c1d7b12f9d504d1315d82b247eef716.tar.gz
sonarqube-fc635a302c1d7b12f9d504d1315d82b247eef716.zip
Fix compatibility with Oracle
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CloseReviewsDecorator.java2
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java10
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;
}