From 8586c9fc456d84ee7b8dfa9d7a5ef78672ab1a12 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Mon, 16 Jul 2012 11:54:30 +0200 Subject: [PATCH] SONAR-2496 Fix HQL request that doesn't work on Oracle... --- .../batch/components/PastSnapshotFinderByPreviousVersion.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 snapshots = session.createQuery(hql) .setParameter("version", projectSnapshot.getVersion()) .setParameter("resourceId", projectSnapshot.getResourceId()) -- 2.39.5