Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-309

provide more information in the event of incorrect @PathParams

XMLWordPrintable

    • Icon: Support Patch Support Patch
    • Resolution: Done
    • Icon: Major Major
    • 1.2.GA
    • 1.1.GA
    • None
    • None

      I got this:
      java.lang.NullPointerException
      at org.jboss.resteasy.core.PathParamInjector.inject(PathParamInjector.java:74)
      at org.jboss.resteasy.core.MethodInjectorImpl.injectArguments(MethodInjectorImpl.java:93)

      Caused by typo:
      @Path("order-

      {order-oid}

      ")
      public JAXRSOrder get(@PathParam("order_oid") long order_oid) {

      I suggest a patch like this could help:
      PathParamInjector.java:68
      else
      {
      List<String> list = request.getUri().getPathParameters(!encode).get(paramName);
      + if(list==null) throw new InternalServerErrorException("No such parameter as '" + paramName'");
      if (extractor.isCollectionOrArray())

      { return extractor.extractValues(list); }

            patriot1burke@gmail.com Bill Burke (Inactive)
            pbkwee_jira Peter Bryant (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: