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.
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.
- csr for
-
JDK-8229235 com.sun.net.httpserver.HttpExchange should implement AutoCloseable
-
- Closed
-
- relates to
-
JDK-6911261 Project Coin: Retrofit Automatic Resource Management (ARM) support onto platform APIs
-
- Closed
-
-
JDK-6963723 Project Coin: Retrofit more JDK classes for ARM
-
- Closed
-