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

HttpClient: Improve encapsulation and convenience of ProxyServer

XMLWordPrintable

      `ProxyServer` used in tests `extends Thread` and `implements Closeable`. The former causes unintentional `Thread` method invocations as reported in JDK-8358048, and the latter makes it inconvenient in a try-with-resources block. Contrast with `HttpTestServer`, which implements `AutoCloseable`. The encapsulation and convenience of `ProxyServer` can be improved by migrating its footprint from `extend Thread implements Closeable` to `implements AutoCloseable`.

      See the associated PR conversation: https://github.com/openjdk/jdk/pull/26473#issuecomment-3121002127

            vyazici Volkan Yazici
            vyazici Volkan Yazici
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: