diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2012-07-16 11:54:30 +0200 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2012-07-16 11:55:15 +0200 |
commit | 8586c9fc456d84ee7b8dfa9d7a5ef78672ab1a12 (patch) | |
tree | 0f05c5df5963519a91af4be8d9a9a1690c59d4d6 /sonar-batch | |
parent | 1acae829018ed8a78292e2cc3bb9c7c17c581c50 (diff) | |
download | sonarqube-8586c9fc456d84ee7b8dfa9d7a5ef78672ab1a12.tar.gz sonarqube-8586c9fc456d84ee7b8dfa9d7a5ef78672ab1a12.zip |
SONAR-2496 Fix HQL request that doesn't work on Oracle...
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByPreviousVersion.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByPreviousVersion.java b/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByPreviousVersion.java index ea2f23ee7b1..b0b54947df1 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByPreviousVersion.java +++ b/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByPreviousVersion.java @@ -38,7 +38,7 @@ public class PastSnapshotFinderByPreviousVersion implements BatchExtension { PastSnapshot findByPreviousVersion(Snapshot projectSnapshot) { String hql = "from " + Snapshot.class.getSimpleName() + - " where version!=:version AND version!='' AND resourceId=:resourceId AND status=:status AND qualifier<>:lib order by createdAt desc"; + " where version<>:version AND version IS NOT NULL AND resourceId=:resourceId AND status=:status AND qualifier<>:lib order by createdAt desc"; List<Snapshot> snapshots = session.createQuery(hql) .setParameter("version", projectSnapshot.getVersion()) .setParameter("resourceId", projectSnapshot.getResourceId()) |