EA-41143 (IOException instead of assert)

This commit is contained in:
Roman Shevchenko
2012-11-23 20:53:33 +01:00
parent 1b3c5d1a41
commit a34fe3f0e6
@@ -442,7 +442,7 @@ public abstract class LocalFileSystemBase extends LocalFileSystem {
final FileInputStream stream = new FileInputStream(convertToIOFileAndCheck(file));
try {
final int length = (int)file.getLength();
assert length >= 0 : file;
if (length < 0) throw new IOException("Invalid file length: " + length + ", " + file);
return FileUtil.loadBytes(stream, length);
}
finally {