From a34fe3f0e665f8acb3d9c1eb85d5dcc113566655 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Fri, 23 Nov 2012 19:45:33 +0100 Subject: [PATCH] EA-41143 (IOException instead of assert) --- .../intellij/openapi/vfs/impl/local/LocalFileSystemBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.java b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.java index d11963de9cd5..eb6bae52939c 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.java @@ -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 {