From f15051480bcb93d38353367feca4fb051332c829 Mon Sep 17 00:00:00 2001 From: Nathanael Jourdane Date: Fri, 11 Mar 2016 10:36:04 +0100 Subject: [PATCH] Use handmade StringJoiner instead of built-in Java8 StringJoiner. --- src/main/java/eu/omp/irap/vespa/epntapclient/utils/Queries.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 d8d8075..5b28e91 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 @@ -19,7 +19,8 @@ package eu.omp.irap.vespa.epntapclient.utils; import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.StringJoiner; + +import eu.omp.irap.vespa.epntapclient.votable.Utils.StringJoiner; /** * @author N. Jourdane @@ -58,14 +59,14 @@ public final class Queries { List possibleValues = ((List) param.getValue()); for (String possibleValue : possibleValues) orJoin.add(param.getKey() + " LIKE '" + possibleValue + "'"); - addJoin.add("(" + orJoin.toString() + ")"); + addJoin.add("(" + orJoin + ")"); } else if (paramClass == String.class) { addJoin.add(param.getKey() + " LIKE '" + param.getValue() + "'"); } else { addJoin.add(param.getKey() + " = " + param.getValue().toString()); } } - String where = "".equals(addJoin.toString()) ? "" : " WHERE " + addJoin.toString(); + String where = "".equals(addJoin) ? "" : " WHERE " + addJoin; return "SELECT TOP " + nbRow + " target_name, target_class FROM " + tableName + where; } -- libgit2 0.21.2