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

org.jboss.resteasy.specimpl.BuiltResponse.getEntity() should return the original GenericEntity<>

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Critical
    • None
    • 3.0.14.Final, 3.0.15.Final, 3.0.16.Final, 3.0.17.Final, 3.6.2.Final
    • jaxrs

    Description

      When building a response with a GenericEntity<> calling getEntity() method on the built reponse will return the enclosed entity of the GenericEntity<>.

      The problem is that when building a new response from an existing response that holds a GenericEntity<> using Response.fromResponse(...).build() the new built response
      is no longer usable because all information about the generic type have been lost (see ResponseBuilderImplTest.java).

      According to the documentation of Response.fromResponse() ("The original response entity instance reference is set in the new response builder") and when looking at the source code of this method it seems that org.jboss.resteasy.specimpl.BuiltResponse.getEntity() should return the original GenericEntity<>.

      Attachments

        Activity

          People

            rsigal@redhat.com Ronald Sigal
            nicones Nicolas NESMON
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: