From 4024708bbcedd8f174fef072540f3f65c832a0a4 Mon Sep 17 00:00:00 2001
From: Simone Bordet
Date: Tue, 5 Nov 2013 09:41:49 +0100
Subject: [PATCH] Connection and NetworkConnector now implements Closeable,
rather than AutoCloseable, since they deal with I/O.
---
jetty-io/src/main/java/org/eclipse/jetty/io/Connection.java | 4 +++-
.../main/java/org/eclipse/jetty/server/NetworkConnector.java | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
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();