|
6 | 6 | import java.io.IOException;
|
7 | 7 | import java.io.UnsupportedEncodingException;
|
8 | 8 | import java.net.URLEncoder;
|
9 |
| -import java.util.ArrayList; |
10 |
| -import java.util.Collection; |
11 | 9 | import java.util.HashMap;
|
12 | 10 | import java.util.Map;
|
13 | 11 | import java.util.Properties;
|
@@ -142,7 +140,7 @@ public static class GitHubApiUrlBuilder {
|
142 | 140 | private String urlFormat;
|
143 | 141 |
|
144 | 142 | /** The parameters map. */
|
145 |
| - private Map<String, Collection<String>> parametersMap = new HashMap<String, Collection<String>>(); |
| 143 | + private Map<String, String> parametersMap = new HashMap<String, String>(); |
146 | 144 |
|
147 | 145 | /** The fields map. */
|
148 | 146 | private Map<String, String> fieldsMap = new HashMap<String, String>();
|
@@ -178,12 +176,7 @@ public GitHubApiUrlBuilder(String urlFormat, String apiVersion, String format) {
|
178 | 176 | */
|
179 | 177 | public GitHubApiUrlBuilder withParameter(String name, String value) {
|
180 | 178 | if (value != null && value.length() > 0) {
|
181 |
| - Collection<String> values = parametersMap.get(name); |
182 |
| - if (values == null) { |
183 |
| - values = new ArrayList<String>(); |
184 |
| - parametersMap.put(name, values); |
185 |
| - } |
186 |
| - values.add(encodeUrl(value)); |
| 179 | + parametersMap.put(name, encodeUrl(value)); |
187 | 180 | }
|
188 | 181 |
|
189 | 182 | return this;
|
|
0 commit comments