Skip to content

Commit a4f04f2

Browse files
committed
Revert "final thing, query param method"
This reverts commit 7061f4c.
1 parent 4f0a147 commit a4f04f2

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

http-client/src/main/java/io/avaje/http/client/HttpClientRequest.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -237,17 +237,6 @@ public interface HttpClientRequest {
237237
*/
238238
HttpClientRequest queryParam(String name, Object value);
239239

240-
/**
241-
* Add a collection query parameters associated with a single key
242-
*
243-
* @param name The name of the query parameter
244-
* @param values The values of the query parameter which can be null
245-
* @return The request being built
246-
*/
247-
default HttpClientRequest queryParam(String name, Collection<Object> value) {
248-
return queryParam(name, (Object) value);
249-
}
250-
251240
/**
252241
* Add a multiple query parameters as name value map.
253242
*

http-client/src/test/java/io/avaje/http/client/HelloControllerTest.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ class HelloControllerTest extends BaseWebTest {
3131
private static final ObjectMapper objectMapper = new ObjectMapper();
3232

3333
final HttpClientContext clientContext = client();
34-
35-
String nullString = null;
3634

3735
@Test
3836
void newClientTest() {
@@ -803,7 +801,7 @@ void async_list_as() throws ExecutionException, InterruptedException {
803801
void get_withPathParamAndQueryParam_returningBean() {
804802

805803
final HelloDto dto = clientContext.request()
806-
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", nullString)
804+
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", null)
807805
.GET()
808806
.bean(HelloDto.class);
809807

@@ -815,7 +813,7 @@ void get_withPathParamAndQueryParam_returningBean() {
815813
@Test
816814
void callBean() {
817815
final HelloDto dto = clientContext.request()
818-
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", (String) null)
816+
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", null)
819817
.GET()
820818
.call().bean(HelloDto.class).execute();
821819

@@ -827,7 +825,7 @@ void callBean() {
827825
@Test
828826
void callBeanAsync() throws ExecutionException, InterruptedException {
829827
final CompletableFuture<HelloDto> future = clientContext.request()
830-
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", (String) null)
828+
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", null)
831829
.GET()
832830
.call().bean(HelloDto.class).async();
833831

@@ -844,7 +842,7 @@ void async_whenComplete_returningBean() throws ExecutionException, InterruptedEx
844842
final AtomicReference<HelloDto> ref = new AtomicReference<>();
845843

846844
final CompletableFuture<HelloDto> future = clientContext.request()
847-
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", nullString)
845+
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", null)
848846
.GET()
849847
.async().bean(HelloDto.class);
850848

@@ -874,7 +872,7 @@ void async_whenComplete_returningBeanWithHeaders() throws ExecutionException, In
874872
final AtomicReference<HttpResponse<HelloDto>> ref = new AtomicReference<>();
875873

876874
final CompletableFuture<HttpResponse<HelloDto>> future = clientContext.request()
877-
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", nullString)
875+
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", null)
878876
.GET()
879877
.async().as(HelloDto.class);
880878

0 commit comments

Comments
 (0)