diff --git a/js/js.tests/test/org/jetbrains/k2js/test/utils/JsTestUtils.java b/js/js.tests/test/org/jetbrains/k2js/test/utils/JsTestUtils.java index 465e025a358..1201b6087da 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/utils/JsTestUtils.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/utils/JsTestUtils.java @@ -39,12 +39,9 @@ public final class JsTestUtils { @NotNull public static String readFile(@NotNull String path) throws IOException { + @SuppressWarnings("IOResourceOpenedButNotSafelyClosed") FileInputStream stream = new FileInputStream(new File(path)); - try { - return FileUtil.loadTextAndClose(stream); - } finally { - stream.close(); - } + return FileUtil.loadTextAndClose(stream); } @NotNull