Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private Object[] resolveParams(HttpContext context) throws ControllerParamsNotMa
RequestParam reqParam = (RequestParam) params[i].annotation;
value = context.getHttpParams().get(reqParam.value());
// only if required is fase
if (value == null && !reqParam.required())
if ((value == null || value.isEmpty()) && !reqParam.required())
required = false;
break;
case REQUEST_BODY:
Expand All @@ -149,7 +149,7 @@ private Object[] resolveParams(HttpContext context) throws ControllerParamsNotMa
break;
}

if ((value == null || value.isEmpty()) && required && !auto)
if (required && !auto && (value == null || value.isEmpty()))
throw new ControllerParamsNotMatchException(String.format("resolve %s failed", params[i].annotation.annotationType().getName()));

try {
Expand Down