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 d79027c..5f4286f 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 @@ -50,10 +50,8 @@ public final class Queries { public static String getQuery(String tableName, Map params, int nbRow) { StringJoiner join = new StringJoiner(" AND "); for (Map.Entry param : params.entrySet()) { - Class paramClass = param.getValue().getClass(); - - if (paramClass == String.class && !"".equals(param.getValue())) { - join.add(param.getKey() + " LIKE '%" + param.getValue() + "%'"); + if (param.getValue().getClass() == String.class) { + join.add(param.getKey() + " LIKE '" + param.getValue() + "'"); } else { join.add(param.getKey() + " = " + param.getValue().toString()); } -- libgit2 0.21.2