mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-42194
This commit is contained in:
@@ -120,7 +120,7 @@ public final class LoadTextUtil {
|
||||
Charset charset = virtualFile.isCharsetSet() ? virtualFile.getCharset() : detectCharset(virtualFile, content);
|
||||
Pair<Charset,byte[]> bomAndCharset = getBOMAndCharset(content, charset);
|
||||
final byte[] bom = bomAndCharset.second;
|
||||
if (saveBOM && bom.length != 0) {
|
||||
if (saveBOM && bom != null && bom.length != 0) {
|
||||
virtualFile.setBOM(bom);
|
||||
}
|
||||
return bomAndCharset;
|
||||
|
||||
Reference in New Issue
Block a user