Commit f15051480bcb93d38353367feca4fb051332c829
1 parent
b6256781
Exists in
master
Use handmade StringJoiner instead of built-in Java8 StringJoiner.
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
src/main/java/eu/omp/irap/vespa/epntapclient/utils/Queries.java
... | ... | @@ -19,7 +19,8 @@ package eu.omp.irap.vespa.epntapclient.utils; |
19 | 19 | import java.util.ArrayList; |
20 | 20 | import java.util.List; |
21 | 21 | import java.util.Map; |
22 | -import java.util.StringJoiner; | |
22 | + | |
23 | +import eu.omp.irap.vespa.epntapclient.votable.Utils.StringJoiner; | |
23 | 24 | |
24 | 25 | /** |
25 | 26 | * @author N. Jourdane |
... | ... | @@ -58,14 +59,14 @@ public final class Queries { |
58 | 59 | List<String> possibleValues = ((List<String>) param.getValue()); |
59 | 60 | for (String possibleValue : possibleValues) |
60 | 61 | orJoin.add(param.getKey() + " LIKE '" + possibleValue + "'"); |
61 | - addJoin.add("(" + orJoin.toString() + ")"); | |
62 | + addJoin.add("(" + orJoin + ")"); | |
62 | 63 | } else if (paramClass == String.class) { |
63 | 64 | addJoin.add(param.getKey() + " LIKE '" + param.getValue() + "'"); |
64 | 65 | } else { |
65 | 66 | addJoin.add(param.getKey() + " = " + param.getValue().toString()); |
66 | 67 | } |
67 | 68 | } |
68 | - String where = "".equals(addJoin.toString()) ? "" : " WHERE " + addJoin.toString(); | |
69 | + String where = "".equals(addJoin) ? "" : " WHERE " + addJoin; | |
69 | 70 | return "SELECT TOP " + nbRow + " target_name, target_class FROM " + tableName + where; |
70 | 71 | } |
71 | 72 | ... | ... |