more IDEA-CR-68293 followup

GitOrigin-RevId: 8e2074533d28dca341f304e8afc7e2a91eba16ac
This commit is contained in:
Alexey Kudravtsev
2020-11-02 13:19:02 +00:00
committed by intellij-monorepo-bot
parent 1b56c9912c
commit f7d260b670
2 changed files with 3 additions and 3 deletions
@@ -42,7 +42,7 @@ public final class VfsUtil extends VfsUtilCore {
public static void saveText(@NotNull VirtualFile file, @NotNull String text) throws IOException {
Charset charset = file.getCharset();
try (OutputStream stream = file.getOutputStream(file)) {
stream.write(text.getBytes(charset.name()));
stream.write(text.getBytes(charset));
}
}
@@ -52,7 +52,7 @@ public final class VfsUtil extends VfsUtilCore {
}
Charset charset = file.getCharset();
return text.getBytes(charset.name());
return text.getBytes(charset);
}
/**
@@ -604,7 +604,7 @@ public abstract class VirtualFile extends UserDataHolderBase implements Modifica
/**
* Returns file content as an array of bytes.
* Has the same effect as {@link #contentsToByteArray(boolean)}.
* Has the same effect as {@link #contentsToByteArray(boolean) contentsToByteArray(true)}.
*
* @return file content
* @throws IOException if an I/O error occurs