Allow empty frames.

This commit is contained in:
akwizgran
2011-12-02 16:10:44 +00:00
parent c8338f9866
commit 4ab5dfcac0
3 changed files with 21 additions and 17 deletions

View File

@@ -33,10 +33,8 @@ public class ConnectionReaderImplTest extends TransportTest {
ByteArrayInputStream in = new ByteArrayInputStream(frame);
ConnectionDecrypter d = new NullConnectionDecrypter(in);
ConnectionReader r = new ConnectionReaderImpl(d, mac, macKey);
try {
r.getInputStream().read();
fail();
} catch(FormatException expected) {}
// There should be no bytes available before EOF
assertEquals(-1, r.getInputStream().read());
}
@Test