Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8203036

com.sun.net.httpserver.HttpExchange should implement AutoCloseable

XMLWordPrintable

    • b13

      A DESCRIPTION OF THE PROBLEM :
      Class com.sun.net.httpserver.HttpExchanage has a close() method which should be called when an HttpExchange ends. Therefore, class com.sun.net.httpserver.HttpExchanage should implement AutoCloseable.

      Expected behavior: Classes which need to be closed can be used with try-with-resources statements because they implement AutoCloseable.
      Actual behavior: HttpExchange cannot be used with try-with-resources statements because it doesn't implement AutoCloseable.


            pconcannon Patrick Concannon (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: