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

ClientInvoker releases connection regardless of entity type being java.io.InputStream

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.0-beta-2
    • 1.2.RC1, 1.2.GA, 1.2.1.GA
    • jaxrs
    • None
    • Low

      When you have a client interface's method declared like:

      @GET
      public InputStream get...(...) ;

      Then org.jboss.resteasy.client.core.ClientInvoker.extractEntity(BaseClientResponse) releases the connection whithout checking for !InputStream.class.isInstance(returnType) like org.jboss.resteasy.client.core.BaseClientResponse.getEntity(Class<T2>, Type, Annotation[]) does.

      Then when you try to read from the InputStream it throws an "stream closed" exception.

            patriot1burke@gmail.com Bill Burke (Inactive)
            plalloni_jira Pablo Lalloni (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: