Skip to content

Commit

Permalink
Updated handling of empty todo query parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
blazmrak committed Nov 13, 2024
1 parent 09267f0 commit 0231b4a
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,15 @@ public Response cookieParamHandling(@QueryParam("todo") String todo,
Response.ResponseBuilder respb = Response.status(200);

if (todo == null) {
sb.append("other stuff");
setReturnValues(paramEntityWithConstructor, paramEntityWithFromString,
paramEntityWithValueOf, setParamEntityWithFromString,
sortedSetParamEntityWithFromString, listParamEntityWithFromString,
"");
setReturnValues(fieldParamEntityWithConstructor,
fieldParamEntityWithFromString, fieldParamEntityWithValueOf,
fieldSetParamEntityWithFromString,
fieldSortedSetParamEntityWithFromString,
fieldListParamEntityWithFromString, FIELD);
} else if (todo.equalsIgnoreCase("setCookie")) {
String cookie_name = "name1";
String cookie_value = "value1";
Expand All @@ -98,6 +106,7 @@ public Response cookieParamHandling(@QueryParam("todo") String todo,
sb.append("name1" + "=" + value);
sb.append("verifyCookie=done");
} else if (todo.equals("")) {
// TODO this block can be removed after https://github.com/quarkusio/quarkus/pull/42468 is merged, kept only for backwards compat
setReturnValues(paramEntityWithConstructor, paramEntityWithFromString,
paramEntityWithValueOf, setParamEntityWithFromString,
sortedSetParamEntityWithFromString, listParamEntityWithFromString,
Expand Down

0 comments on commit 0231b4a

Please sign in to comment.