[MGNLRESTCL-30] Rest Client App completely unusable Created: 04/May/18  Updated: 27/Oct/20  Resolved: 27/Oct/20

Status: Closed
Project: REST Client
Component/s: app
Affects Version/s: 1.5.3
Fix Version/s: 2.0

Type: Bug Priority: Critical
Reporter: Vyacheslav Mayorov Assignee: Unassigned
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 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;
    }



 Comments   
Comment by Jan Haderka [ 27/Oct/20 ]

Presenter class was removed as of v 2.0.

Generated at Mon Feb 12 10:42:31 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.