Uploaded image for project: 'REST Client'
  1. REST Client
  2. MGNLRESTCL-30

Rest Client App completely unusable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Critical Critical
    • 2.0
    • 1.5.3
    • app
    • None

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

        Acceptance criteria

              Unassigned Unassigned
              acc15 Vyacheslav Mayorov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD