Fix net.i2p.data.*Key tests, remove dead code

Broken in 463f5347b682f23a159bdeb06ffc8f55c5c2cff7 by an underlying API change.
The dead code threw the previously-expected exception.
This commit is contained in:
str4d
2017-12-02 17:42:59 +00:00
parent 60efd0b426
commit b8eeb72044
5 changed files with 14 additions and 12 deletions

View File

@@ -80,10 +80,8 @@ public abstract class SimpleDataStructure extends DataStructureImpl {
throw new RuntimeException("Data already set");
int length = length();
_data = new byte[length];
int read = read(in, _data);
if (read != length)
throw new DataFormatException("EOF reading " + getClass().getSimpleName() +
", read: " + read + ", required: " + length);
// Throws on incomplete read
read(in, _data);
}
public void writeBytes(OutputStream out) throws DataFormatException, IOException {