Details
-
Bug
-
Resolution: Obsolete
-
Critical
-
1.5.3
-
None
Description
There are multiple problems with this App, may be it must be split to multiple issues.
Following sources from info.magnolia.rest.client.app.ui.RestClientAppPresenter class
Problems
- It wont execute requests if there is no parameters - only request body. Exception: wrong argument count.
private Object[] parseParameters(Method method, String parametersAsString, String body) throws IOException {
List<Object> parameters = new ArrayList<Object>();
if (StringUtils.isNotEmpty(parametersAsString)) {
...
}
}
- It wont parse request body from json string to desired argument type (info.magnolia.rest.client.app.ui.RestClientAppPresenter#corvertValue)
- If argument is primitive ... Then it will send its hashCode() instead of actual value
protected Object corvertValue(String input, Class clazz) throws IOException {
....
if (clazz.isPrimitive()) {
return convertedValue.hashCode(); //hashCode = primitive value
}
return convertedValue;
}
Checklists
Acceptance criteria