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

NPE while sending empty POST requests with Client

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.5.5.Final
    • None
    • None
    • None

    Description

      While implementing the integration between cloudevents new sdk and jax-rs (code here https://github.com/slinkydeveloper/sdk-java/blob/jaxrs/http/restful-ws/src/main/java/io/cloudevents/http/restful/ws/CloudEventsProvider.java) I've found out that, If i send a request with an `Entity`, the entity is processed by a `MessageBodyWriter` that eventually removes the `Content-Type`, an NPE happens:

      Caused by: java.lang.NullPointerException
      	at org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.buildEntity(ManualClosingApacheHttpClient43Engine.java:553)
      	at org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.loadHttpMethod(ManualClosingApacheHttpClient43Engine.java:454)
      

      cc FroMage

      Attachments

        Issue Links

          Activity

            People

              jperkins-rhn James Perkins
              francescoguard@gmail.com Francesco Guardiani (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: