diff --git a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocket.java b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocket.java index 5efe7e86b..f8924d15d 100644 --- a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocket.java +++ b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocket.java @@ -25,13 +25,19 @@ public interface I2PSocket extends Closeable { public Destination getPeerDestination(); /** - * @return an InputStream to read from the socket. + * As of 0.9.9 will throw an IOE if socket is closed. + * Prior to that would return null instead of throwing IOE. + * + * @return an InputStream to read from the socket. Non-null since 0.9.9. * @throws IOException on failure */ public InputStream getInputStream() throws IOException; /** - * @return an OutputStream to write into the socket. + * As of 0.9.9 will throw an IOE if socket is closed. + * Prior to that would return null instead of throwing IOE. + * + * @return an OutputStream to write into the socket. Non-null since 0.9.9. * @throws IOException on failure */ public OutputStream getOutputStream() throws IOException; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/I2PSocketFull.java b/apps/streaming/java/src/net/i2p/client/streaming/I2PSocketFull.java index 3652bcf4e..09060b595 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/I2PSocketFull.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/I2PSocketFull.java @@ -67,15 +67,15 @@ class I2PSocketFull implements I2PSocket { Connection getConnection() { return _connection; } /** - * Warning, may return null instead of throwing IOE, - * which is not what the interface says. + * As of 0.9.9 will throw an IOE if socket is closed. + * Prior to that would return null instead of throwing IOE. + * @return non-null */ - public InputStream getInputStream() { + public InputStream getInputStream() throws IOException { Connection c = _connection; if (c != null) return c.getInputStream(); - else - return null; + throw new IOException("Socket closed"); } public I2PSocketOptions getOptions() { @@ -96,15 +96,15 @@ class I2PSocketFull implements I2PSocket { } /** - * Warning, may return null instead of throwing IOE, - * which is not what the interface says. + * As of 0.9.9 will throw an IOE if socket is closed. + * Prior to that would return null instead of throwing IOE. + * @return non-null */ public OutputStream getOutputStream() throws IOException { Connection c = _connection; if (c != null) return c.getOutputStream(); - else - return null; + throw new IOException("Socket closed"); } public Destination getPeerDestination() { return _remotePeer; } diff --git a/history.txt b/history.txt index dd03d2f15..83aa5aad4 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,11 @@ +2013-10-17 zzz + * I2CP: Move SSL client socket code to util, + move cert location to certificates/i2cp. + * I2PTunnel: Support SSL for connection to local server + for Standard, HTTP, and IRC server tunnels. + Put server cert in certificates/i2ptunnel if necessary. + * Streaming: Throw IOE if socket is closed (ticket #1077) + 2013-10-14 kytv * French translation updates from Transifex diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index f6e6df3a5..4e28a2c8d 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 4; + public final static long BUILD = 5; /** for example "-test" */ public final static String EXTRA = "";