jersey
  1. jersey
  2. JERSEY-1191

Calling methods from WebTarget does not throw IllegalStateException when client is closed

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0-m05
    • Fix Version/s: 2.0-m06, 2.0
    • Component/s: None
    • Labels:
      None

      Description

      JavaDoc on Client#close() says:

      Calling this method effectively invalidates all WebTarget resource targets produced by the client instance. Invoking any method on such targets once the client is closed would result in an IllegalStateException being thrown.

      But calling

      Client client = ClientFactory.newClient();
      WebTarget target = client.target("...");
      client.close();
      target.anyMethod();
      

      throws NullPointerException

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Martin Matula
              Reporter:
              jan.supol
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: