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

RestEasy Client Framework throws null point exception when the @CookieParam() is null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.2.RC1
    • None
    • None
    • None
    • Hide

      I have to create 2 interface (with/without post the cookie), and check the cookie to see which interface to call.

      Show
      I have to create 2 interface (with/without post the cookie), and check the cookie to see which interface to call.

    Description

      If I have a remote interface defined as

      <code>
      @POST
      @Path("/myCookie")
      public ClientResponse<String> postWithCookie(@CookieParam("testCookie") String testCookie);
      </code>

      in the initial call, when there is no cookie was set, resteasy will throw NPE.
      if the cookie was set already, then the request works.

      <code>java.lang.NullPointerException
      at org.jboss.resteasy.client.ClientRequest.toString(ClientRequest.java:213)
      at org.jboss.resteasy.client.ClientRequest.cookie(ClientRequest.java:280)
      at org.jboss.resteasy.client.core.marshallers.CookieParamMarshaller.build(CookieParamMarshaller.java:34)
      at org.jboss.resteasy.client.core.ClientInvoker.createRequest(ClientInvoker.java:121)
      at org.jboss.resteasy.client.core.ClientInvoker.invoke(ClientInvoker.java:87)
      at org.jboss.resteasy.client.core.ClientProxy.invoke(ClientProxy.java:72)</code>

      Attachments

        Activity

          People

            patriot1burke@gmail.com Bill Burke (Inactive)
            jy1999us_jira jeff yin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: