Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7493

Cannot define a List<Double> or List<Long> as a query param

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.12
    • Fix Version/s: 3.1.14, 3.2.1
    • Component/s: None
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      When defining a resource method like:

      public JsonObject verifyInjectedCustomIntegerArray(@QueryParam("value") List<Long> array)
      public JsonObject verifyInjectedCustomDoubleArray(@QueryParam("value") List<Double> array)
      

      The following stacktrace is shown when parsing the body:

      java.lang.NullPointerException
      	at org.apache.cxf.jaxrs.utils.InjectionUtils.injectIntoCollectionOrArray(InjectionUtils.java:904)
      	at org.apache.cxf.jaxrs.utils.InjectionUtils.createParameterObject(InjectionUtils.java:1003)
      	at org.apache.cxf.jaxrs.utils.JAXRSUtils.readQueryString(JAXRSUtils.java:1196)
      	at org.apache.cxf.jaxrs.utils.JAXRSUtils.createHttpParameterValue(JAXRSUtils.java:872)
      	at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:842)
      	at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:793)
      	at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:212)
      	at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:77)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
      	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
      	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:263)
      	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
      	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:189)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:299)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:223)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:274)
      	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              johndament John D. Ament
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: