a bullet-proof non-directory assertion (EA-38183)

This commit is contained in:
peter
2013-07-11 17:30:09 +02:00
parent 1f156c6643
commit 901809f523
@@ -351,7 +351,9 @@ public final class LoadTextUtil {
return convertLineSeparators(buffer).first;
}
assert !file.isDirectory() : "'"+file.getPresentableUrl() + "' is directory";
if (file.isDirectory()) {
throw new AssertionError("'" + file.getPresentableUrl() + "' is directory");
}
final FileType fileType = file.getFileType();
if (fileType.isBinary()) {