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

NullPointerException when Accept is empty

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.1.4.Final
    • Fix Version/s: 4.0.0.Beta1
    • Component/s: jaxrs
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      curl URL --header "Accept:"

      Show
      curl URL --header "Accept:"

      Description

      java.lang.NullPointerException
      at org.jboss.resteasy.plugins.server.servlet.HttpServletResponseHeaders.putResponseHeader(HttpServletResponseHeaders.java:167)
      at org.jboss.resteasy.plugins.server.servlet.HttpServletResponseHeaders.putAll(HttpServletResponseHeaders.java:157)
      at org.jboss.resteasy.core.ServerResponseWriter.commitHeaders(ServerResponseWriter.java:397)
      at org.jboss.resteasy.core.ServerResponseWriter$1.commit(ServerResponseWriter.java:123)
      at org.jboss.resteasy.util.CommitHeaderOutputStream.commit(CommitHeaderOutputStream.java:50)
      at org.jboss.resteasy.util.CommitHeaderOutputStream.write(CommitHeaderOutputStream.java:70)
      at org.jboss.resteasy.util.DelegatingOutputStream.write(DelegatingOutputStream.java:48)
      at com.fasterxml.jackson.core.json.UTF8JsonGenerator._flushBuffer(UTF8JsonGenerator.java:2039)
      at com.fasterxml.jackson.core.json.UTF8JsonGenerator.flush(UTF8JsonGenerator.java:1051)
      at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:953)
      at org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.writeTo(ResteasyJackson2Provider.java:240)
      at org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext.writeTo(AbstractWriterInterceptorContext.java:137)
      at org.jboss.resteasy.core.interception.jaxrs.ServerWriterInterceptorContext.writeTo(ServerWriterInterceptorContext.java:61)
      at org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext.proceed(AbstractWriterInterceptorContext.java:124)
      at org.jboss.resteasy.core.ServerResponseWriter.writeNomapResponse(ServerResponseWriter.java:141)
      at org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:473)
      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:422)
      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:209)
      at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)
      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jim.ma Jim Ma
                Reporter:
                alukanin Artem Lukanin
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: