Commit 090a1158e20e7b359baf9cece08f888aad619d14

Authored by Nathanael Jourdane
1 parent 506d0c0b
Exists in master

bugFix Queries: don't print WHERE clause if no parameters.

src/main/java/eu/omp/irap/vespa/epntapclient/utils/Queries.java
@@ -69,7 +69,7 @@ public final class Queries { @@ -69,7 +69,7 @@ public final class Queries {
69 addJoin.add(param.getKey() + " = " + param.getValue().toString()); 69 addJoin.add(param.getKey() + " = " + param.getValue().toString());
70 } 70 }
71 } 71 }
72 - String where = "".equals(addJoin) ? "" : " WHERE " + addJoin; 72 + String where = "".equals(addJoin.toString()) ? "" : " WHERE " + addJoin;
73 return "SELECT TOP " + nbRow + " target_name, target_class FROM " + tableName + where; 73 return "SELECT TOP " + nbRow + " target_name, target_class FROM " + tableName + where;
74 } 74 }
75 75