From 090a1158e20e7b359baf9cece08f888aad619d14 Mon Sep 17 00:00:00 2001 From: Nathanael Jourdane Date: Fri, 11 Mar 2016 12:07:26 +0100 Subject: [PATCH] bugFix Queries: don't print WHERE clause if no parameters. --- src/main/java/eu/omp/irap/vespa/epntapclient/utils/Queries.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/utils/Queries.java b/src/main/java/eu/omp/irap/vespa/epntapclient/utils/Queries.java index dc4473c..24f534b 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/utils/Queries.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/utils/Queries.java @@ -69,7 +69,7 @@ public final class Queries { addJoin.add(param.getKey() + " = " + param.getValue().toString()); } } - String where = "".equals(addJoin) ? "" : " WHERE " + addJoin; + String where = "".equals(addJoin.toString()) ? "" : " WHERE " + addJoin; return "SELECT TOP " + nbRow + " target_name, target_class FROM " + tableName + where; } -- libgit2 0.21.2