From 824868b1f874898d77f2d9931a2004ab0b39ee8e Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Wed, 23 Oct 2013 13:59:51 +0200 Subject: [PATCH] don't createNewFile in assertion, running without -ea will ruin side effect --- .../com/intellij/openapi/vfs/local/LocalFileSystemTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/vfs/local/LocalFileSystemTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/vfs/local/LocalFileSystemTest.java index ca6b5ae32ff3..c63f68599cde 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/vfs/local/LocalFileSystemTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/vfs/local/LocalFileSystemTest.java @@ -145,7 +145,8 @@ public class LocalFileSystemTest extends PlatformLangTestCase { final File dirFile = createTempDirectory(); final String name = "te\u00dft123123123.txt"; final File childFile = new File(dirFile, name); - assert childFile.createNewFile() || childFile.exists() : childFile; + boolean created = childFile.createNewFile(); + assert created || childFile.exists() : childFile; final VirtualFile dir = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(dirFile); assertNotNull(dir);