You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while converting q to different data types, response would be as follows
routeContext.getParameter("q").toInt() # gives 0(default value)
routeContext.getParameter("q").toString() # gives empty string
routeContext.getParameter("q").toList() # gives a list containing empty string
Shouldn't toList() return empty list??
This is because in toList method in ParameterValue.java, only null check is done.
It would be better to check for this condition also
if (isNull() || (values.length==1 && StringUtils.isNullorEmpty(values[0])))
This would return defaultValue (in this case, empty list). or is there a reason for present approach??
If my approach looks good, I will raise a PR for this one
The text was updated successfully, but these errors were encountered:
For following url,
example.com?q=&format=json
while converting q to different data types, response would be as follows
Shouldn't
toList()
return empty list??This is because in
toList
method inParameterValue.java
, only null check is done.It would be better to check for this condition also
This would return
defaultValue
(in this case, empty list). or is there a reason for present approach??If my approach looks good, I will raise a PR for this one
The text was updated successfully, but these errors were encountered: