Uploaded image for project: 'Wink'
  1. Wink
  2. WINK-316

AdminServlet doesn't process QueryParams properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1.1
    • 1.1.2
    • Server
    • None
    • Patch Available

    Description

      The AdminServlet doesn't include parameters of type QueryParam in its output.
      The reason is that the code to do that uses MatrixParam instead.

      The method buildQueryParams handles query params and instead of checking for QueryParam it's checking for MatrixParam (the problem is the "==injectable.ParamType.MATRIX").

      Here is the fixed method:

      private void buildQueryParams(MethodMetadata methodMetadata, QueryParameters xmlQueryVariables) {
              List<Injectable> formalParameters = methodMetadata.getFormalParameters();
              for (Injectable var : formalParameters) {
                  if (var.getParamType() == Injectable.ParamType.QUERY) {
                      Parameter param = resourcesObjectFactory.createParameter();
                      param.setValue(((BoundInjectable)var).getName());
                      xmlQueryVariables.getParameter().add(param);
                  }
              }
          }
      

      Attachments

        1. AdminServlet.java
          23 kB
          Ruby Boyarski

        Activity

          People

            bluk Bryant Luk
            rubyboy Ruby Boyarski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified