Wink
  1. Wink
  2. WINK-316

AdminServlet doesn't process QueryParams properly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.1
    • Fix Version/s: 1.1.2
    • Component/s: Server
    • Labels:
      None
    • Patch Info:
      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);
                  }
              }
          }
      
      1. AdminServlet.java
        23 kB
        Ruby Boyarski

        Activity

        Ruby Boyarski created issue -
        Ruby Boyarski made changes -
        Field Original Value New Value
        Patch Info [Patch Available]
        Ruby Boyarski made changes -
        Attachment AdminServlet.java [ 12456473 ]
        Hide
        Bryant Luk added a comment -

        Patch looks good to me so I went ahead and applied it. Thanks for the patch.

        Show
        Bryant Luk added a comment - Patch looks good to me so I went ahead and applied it. Thanks for the patch.
        Bryant Luk made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Bryant Luk [ bluk ]
        Fix Version/s 1.1.2 [ 12315153 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in Wink-Trunk-JDK1.5 #390 (See https://hudson.apache.org/hudson/job/Wink-Trunk-JDK1.5/390/)
        Fix AdminServlet to process query parameters correctly

        See WINK-316

        Thanks to Ruby Boyarski for reporting the issue
        and the patch.

        Show
        Hudson added a comment - Integrated in Wink-Trunk-JDK1.5 #390 (See https://hudson.apache.org/hudson/job/Wink-Trunk-JDK1.5/390/ ) Fix AdminServlet to process query parameters correctly See WINK-316 Thanks to Ruby Boyarski for reporting the issue and the patch.
        Gerhard Petracek made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        14h 34m 1 Bryant Luk 06/Oct/10 15:30
        Resolved Resolved Closed Closed
        1011d 5h 42m 1 Gerhard Petracek 13/Jul/13 21:13

          People

          • Assignee:
            Bryant Luk
            Reporter:
            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

                Development