Fix stream close in JsTestUtils

This commit is contained in:
pTalanov
2012-03-06 14:46:21 +04:00
parent d5da6e8c23
commit 7b75697d6d
@@ -39,12 +39,9 @@ public final class JsTestUtils {
@NotNull @NotNull
public static String readFile(@NotNull String path) throws IOException { public static String readFile(@NotNull String path) throws IOException {
@SuppressWarnings("IOResourceOpenedButNotSafelyClosed")
FileInputStream stream = new FileInputStream(new File(path)); FileInputStream stream = new FileInputStream(new File(path));
try { return FileUtil.loadTextAndClose(stream);
return FileUtil.loadTextAndClose(stream);
} finally {
stream.close();
}
} }
@NotNull @NotNull