diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/Connection.java b/jetty-io/src/main/java/org/eclipse/jetty/io/Connection.java index 1fefe754009..5ac5c72a6c6 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/Connection.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/Connection.java @@ -18,6 +18,8 @@ package org.eclipse.jetty.io; +import java.io.Closeable; + import org.eclipse.jetty.util.Callback; /** @@ -28,7 +30,7 @@ import org.eclipse.jetty.util.Callback; * and when the {@link EndPoint} signals read readyness, this {@link Connection} can * read bytes from the network and interpret them.
*/ -public interface Connection extends AutoCloseable +public interface Connection extends Closeable { public void addListener(Listener listener); diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/NetworkConnector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/NetworkConnector.java index d7304d8fc32..fbbffb6d032 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/NetworkConnector.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/NetworkConnector.java @@ -18,12 +18,13 @@ package org.eclipse.jetty.server; +import java.io.Closeable; import java.io.IOException; /** *A {@link Connector} for TCP/IP network connectors
*/ -public interface NetworkConnector extends Connector, AutoCloseable +public interface NetworkConnector extends Connector, Closeable { /** *Performs the activities needed to open the network communication @@ -39,7 +40,6 @@ public interface NetworkConnector extends Connector, AutoCloseable * (for example, to stop accepting network connections).
* Once a connector has been closed, it cannot be opened again without first * calling {@link #stop()} and it will not be active again until a subsequent call to {@link #start()} - * @throws IOException if this connector cannot be closed */ @Override void close();